feat(#93): readBlobGranules (FDBReadBlobGranuleContext) and summarizeBlobGranules - #113
Merged
Conversation
…BlobGranules - FFI: FDBResult typedef, FDBGranuleSummary (packed), FDBReadBlobGranuleContext with function-pointer typedefs, fdb_transaction_read_blob_granules, fdb_transaction_summarize_blob_granules, fdb_future_get_granule_summary_array, fdb_result_get_keyvalue_array, fdb_result_destroy - ReadTransaction::readBlobGranules(): synchronous FDBResult call returning list<KeyValue>; file data fetched via the new BlobGranuleLoader interface, wired by BlobGranuleReadContext (debugNoMaterialize + granuleParallelism) - ReadTransaction::summarizeBlobGranules(): FutureGranuleSummaryArray of BlobGranuleSummary; rangeLimit must be >= 1 (client asserts chunkLimit > 0) - Integration tests: loader validation, debug read request, summary shape (skip 1064/2108 on clusters without a granule blob store) - docs/blob-granules.md + CHANGELOG entries Closes #93
7 tasks
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.
Closes #93 — final part of the blob granule API (follow-up to #112).
FFI (
NativeClient::FDB_HEADER)FDBResulttypedef;fdb_result_get_keyvalue_array/fdb_result_destroyFDBGranuleSummary(packed) +fdb_future_get_granule_summary_arrayFDBReadBlobGranuleContext+ function-pointer typedefs (FDBBGStartLoadFn,FDBBGGetLoadFn,FDBBGFreeLoadFn)fdb_transaction_read_blob_granules,fdb_transaction_summarize_blob_granulesAPI
ReadTransaction::readBlobGranules()— synchronousFDBResultcall returninglist<KeyValue>; granule file data fetched through the newBlobGranuleLoaderinterface wired into the native callbacks byBlobGranuleReadContext(keeps closures/buffers alive, supportsdebugNoMaterializeandgranuleParallelism). Loader required unlessdebugNoMaterialize.ReadTransaction::summarizeBlobGranules()— future oflist<BlobGranuleSummary>(new DTO +FutureGranuleSummaryArray).rangeLimitmust be >= 1 (the client library assertschunkLimit > 0otherwise — found in testing, error 4100).summaryVersiondefaults to the transaction's current read version (passingLATEST_VERSION/-2 yields error 1064 on the client).Tests / docs
tests/Integration/BlobGranuleTest.php: loader validation, debug read request, summary shape (materialization-dependent tests skip with 1064/2108 on clusters without a granule blob store — the default docker cluster has no blob store, so the C API reports unsupported operation)docs/blob-granules.mdupdated (loader contract + cluster requirements), CHANGELOG entry.Verification
composer lintclean (PHPCS + Rector + PHPStan 9)composer test:unit: 596 tests OK