feat: Add C bindings for DynamoDB Big Segments store#579
Open
beekld wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a C binding for
DynamoDBBigSegmentStoreso C callers can wire the existing DynamoDB Big Segments integration into the SDK's Big Segments config.New public surface:
LDServerBigSegmentsDynamoDBStoreopaque handle.struct LDServerBigSegmentsDynamoDBResultwithstoreanderror_messagefields.LDSERVER_BIGSEGMENTS_DYNAMODBSTORE_ERROR_MESSAGE_SIZEmacro.LDServerBigSegmentsDynamoDBStore_New(table_name, prefix, options, out_result)factory.LDServerBigSegmentsDynamoDBStore_Free(store).Tests:
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 bindingLDServerBigSegmentsRedisStore(#574) and the sibling DynamoDB LazyLoad bindingLDServerLazyLoadDynamoDBSource(#576). Theoptionsparameter reuses theLDServerDynamoDBClientOptionsBuilderintroduced 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-sizeerror_messagebuffer, and optionalLDServerDynamoDBClientOptionsBuilder(consumed on success;NULLuses the AWS default provider chain). The implementation delegates toDynamoDBBigSegmentStore::Createand documents wiring throughLDServerBigSegmentsBuilderandLDServerConfigBuilder_BigSegments.Build wiring adds
bindings/dynamodb/dynamodb_big_segment_store.cppto 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.