GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||
GeezerVison is showing github.com — feat: Batch DynamoDB online reads across feature views by NopeCharon · Pull Request #7134 · feast-dev/feast Conversation
Contributor
What this PR does / why we need it:The generic DynamoDB keeps each feature view in its own table, and one
For example, a request for 10 feature views and 5 entities now needs 1
The gating follows the PostgreSQL implementation (#6832):
Error and throttling behaviour does not change: any exception from Docs: the DynamoDB online store reference (new option plus a performance note) and the online server performance tuning guide. Which issue(s) this PR fixes:Refs #3259 Checks
Testing Strategy
New tests are in
The existing DynamoDB unit tests still pass. MiscRelease note: The DynamoDB online store now packs the reads of every feature view in a request into shared BatchGetItem calls, so requests that span several feature views need fewer round trips. The new
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
|
There was an error while loading. Please reload this page.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## master #7134 +/- ## ========================================== + Coverage 51.88% 52.06% +0.18% ========================================== Files 458 459 +1 Lines 57726 57881 +155 Branches 8486 8506 +20 ========================================== + Hits 29950 30137 +187 + Misses 25745 25705 -40 - Partials 2031 2039 +8
... and 8 files with indirect coverage changes Continue to review full report in Codecov by Harness.
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
bb3b127 to
4342d12
Compare
The generic OnlineStore._read_features_per_fv loop reads one feature view after another, so a sync request spanning N feature views costs at least N sequential BatchGetItem round trips, and an async one at least N concurrent requests. Redis and Postgres already override that seam to batch; DynamoDB now does too. Each feature view lives in its own DynamoDB table, and a single BatchGetItem request can read from several tables at once. The override resolves every view's entity ids up front, packs all of the keys into as few requests as possible (at most batch_size keys each, across all of their tables), sends those requests in parallel (a thread pool capped at max_read_workers on the sync path, asyncio.gather on the async path) and then splits the returned items back apart by table and entity id. Each table keeps its own ProjectionExpression and ConsistentRead setting. BatchGetItem rejects a request that repeats a key within a table, so views that map to the same table, such as one feature view requested under two aliases, are read once with the union of their requested features. Following the Postgres implementation, a single-view request keeps the generic path, and requests larger than the new max_batched_result_rows setting (entity rows x feature views, default 2048, 0 disables batching) also fall back to it. Past that size each view already fills requests of its own, so packing saves at most one partially filled request per view while holding every view's items at once. The item parsing in _process_batch_get_response moves into a shared _to_read_row helper so the batched and per-view paths decode items identically. Refs feast-dev#3259 Signed-off-by: NopeCharon <[email protected]>
4342d12 to
51b75b5
Compare
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.