Skip to content

feat(#93): readBlobGranules (FDBReadBlobGranuleContext) and summarizeBlobGranules - #113

Merged
s2x merged 1 commit into
masterfrom
feat/93-read-blob-granules
Sep 9, 2026
Merged

feat(#93): readBlobGranules (FDBReadBlobGranuleContext) and summarizeBlobGranules#113
s2x merged 1 commit into
masterfrom
feat/93-read-blob-granules

Conversation

@s2x

@s2x s2x commented Sep 9, 2026

Copy link
Copy Markdown
Member

Closes #93 — final part of the blob granule API (follow-up to #112).

FFI (NativeClient::FDB_HEADER)

  • FDBResult typedef; fdb_result_get_keyvalue_array / fdb_result_destroy
  • FDBGranuleSummary (packed) + fdb_future_get_granule_summary_array
  • FDBReadBlobGranuleContext + function-pointer typedefs (FDBBGStartLoadFn, FDBBGGetLoadFn, FDBBGFreeLoadFn)
  • fdb_transaction_read_blob_granules, fdb_transaction_summarize_blob_granules

API

  • ReadTransaction::readBlobGranules() — synchronous FDBResult call returning list<KeyValue>; granule file data fetched through the new BlobGranuleLoader interface wired into the native callbacks by BlobGranuleReadContext (keeps closures/buffers alive, supports debugNoMaterialize and granuleParallelism). Loader required unless debugNoMaterialize.
  • ReadTransaction::summarizeBlobGranules() — future of list<BlobGranuleSummary> (new DTO + FutureGranuleSummaryArray). rangeLimit must be >= 1 (the client library asserts chunkLimit > 0 otherwise — found in testing, error 4100).
  • summaryVersion defaults to the transaction's current read version (passing LATEST_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.md updated (loader contract + cluster requirements), CHANGELOG entry.

Verification

  • composer lint clean (PHPCS + Rector + PHPStan 9)
  • composer test:unit: 596 tests OK
  • Full integration suite against the Docker cluster: 281 tests OK (6 skips: 4 pre-existing + 2 blob-store-dependent)

…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
@s2x
s2x merged commit fe0bf50 into master Sep 9, 2026
6 checks passed
@s2x
s2x deleted the feat/93-read-blob-granules branch September 9, 2026 11:56
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.

Add blob granule API (blobbify/purge/read blob granules)

1 participant