Skip to content

feat: Add C bindings for DynamoDB Big Segments store#579

Open
beekld wants to merge 1 commit into
beeklimt/SDK-2629/dynamodb-lazyload-c-bindingfrom
beeklimt/SDK-2630/dynamodb-big-segments-c-binding
Open

feat: Add C bindings for DynamoDB Big Segments store#579
beekld wants to merge 1 commit into
beeklimt/SDK-2629/dynamodb-lazyload-c-bindingfrom
beeklimt/SDK-2630/dynamodb-big-segments-c-binding

Conversation

@beekld

@beekld beekld commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds a C binding for DynamoDBBigSegmentStore so C callers can wire the existing DynamoDB Big Segments integration into the SDK's Big Segments config.

New public surface:

  • LDServerBigSegmentsDynamoDBStore opaque handle.
  • struct LDServerBigSegmentsDynamoDBResult with store and error_message fields.
  • LDSERVER_BIGSEGMENTS_DYNAMODBSTORE_ERROR_MESSAGE_SIZE macro.
  • LDServerBigSegmentsDynamoDBStore_New(table_name, prefix, options, out_result) factory.
  • LDServerBigSegmentsDynamoDBStore_Free(store).

Tests:

  • Unit tests for successful creation with and without the options builder (NULL means "AWS SDK default provider chain").
  • End-to-end test against DynamoDB Local: primes a sync timestamp via PrefixedDynamoDBClient::PutBigSegmentSyncTime, wires the store through the C API, and verifies the SDK reports the store available via the Big Segment status listener.

The type name uses config-section-first word order (BigSegments + DynamoDB + Store), matching the sibling Redis Big Segments binding LDServerBigSegmentsRedisStore (#574) and the sibling DynamoDB LazyLoad binding LDServerLazyLoadDynamoDBSource (#576). The options parameter reuses the LDServerDynamoDBClientOptionsBuilder introduced in #576.

Stacked on #576 (DynamoDB LazyLoad source). Please review that PR first.


Note

Low Risk
New public C surface and binding glue only; core Big Segments DynamoDB logic is unchanged and risk is limited to ownership/error-handling in the thin wrapper.

Overview
Exposes the existing DynamoDB Big Segments integration to C callers via a new public header and thin C++ shim, following the same patterns as the Redis Big Segments and DynamoDB LazyLoad C bindings.

The API adds LDServerBigSegmentsDynamoDBStore_New / _Free, a result struct with a fixed-size error_message buffer, and optional LDServerDynamoDBClientOptionsBuilder (consumed on success; NULL uses the AWS default provider chain). The implementation delegates to DynamoDBBigSegmentStore::Create and documents wiring through LDServerBigSegmentsBuilder and LDServerConfigBuilder_BigSegments.

Build wiring adds bindings/dynamodb/dynamodb_big_segment_store.cpp to the dynamodb-source library. Tests cover creation with and without options, plus a DynamoDB Local end-to-end path that seeds Big Segments sync metadata and asserts the SDK Big Segment store status listener reports available.

Reviewed by Cursor Bugbot for commit 538459c. Bugbot is set up for automated code reviews on this repo. Configure here.

@beekld beekld marked this pull request as ready for review July 2, 2026 00:09
@beekld beekld requested a review from a team as a code owner July 2, 2026 00:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant