feat(#91): add Transaction::getMappedRange() for single-round-trip index lookups - #103
Merged
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.
Closes #91
Summary
Adds
ReadTransaction::getMappedRange()— single-round-trip index lookups backed byfdb_transaction_get_mapped_range/fdb_future_get_mappedkeyvalue_array. Each resolved index row is returned as aMappedKeyValuepairing the index key/value with the records described by the mapper tuple template ({K[N]},{V[N]}, and the trailing{...}range descriptor).Notes / findings
Snapshotthrows aLogicException.fdb_c.hFDBMappedKeyValuedeclaration does not model the real reply layout: the native client returns either a point lookup or a range lookup per row (selected by a variant index at offset 104). The FFI layer decodes both alternatives — details in the issue comment.docker/php/Dockerfilenow derives the FoundationDB clients deb arch fromTARGETARCH(the image previously shipped a mismatchedlibfdb_con arm64 builds).Testing
composer lintclean (PHPCS + Rector + PHPStan L9)composer test:unit— 490 tests passcomposer test:integration— 239 tests / 813 assertions pass on the 5-node 7.3.75 cluster, including the newMappedRangeTest(7 tests)docs/range-reads.mddocuments the mapper syntax;CHANGELOG.mdupdated