Iterate over update history in handleWriteBatch#902
Merged
DZakh merged 1 commit intoJan 14, 2026
Conversation
Previously, handleWriteBatch only inspected update.latestChange, skipping earlier entries in update.history. This change mirrors PgStorage.res behavior by iterating over all history entries and applying Set/Delete logic for each. Includes a fallback to process latestChange when history is empty for backwards compatibility.
Contributor
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
DZakh
added a commit
that referenced
this pull request
Jan 14, 2026
* Replace mocha, chai and tsx with vitest * Add testrust command * Make erc20 template multichain * Don't register test files as handlers * Add ADR - why vitest * Support Vitest with ReScript * Codegen types * Add validation to indexer.process call * Add WorkerThreads bindings * Modify rescript_types.rs to support TS * Always return entity types capitalized * First implementation * Formatting update * Make testIndexer.process return changes * Improvements for test indexer * Final touches * Small clean up * Try to fix ci tests * Change internal.config.ts codegen to .json and .d.ts codegen * Fixes after merge * Silent logs for MockIndexer * Implement entity field comparison operators (#898) * Fix test indexer field comparison for bigint and BigDecimal Store decoded entities instead of JSON to enable proper comparison. The previous implementation stored JSON values and compared them directly, which fails for bigint and BigDecimal since they serialize as strings. Now entities are parsed when received from the worker thread, and comparisons use the TableIndices.FieldValue logic that properly handles numeric type comparisons. * Simplify field comparison using schema-based conversion Use entityConfig.table field schema with S.convertOrThrow to parse JSON field values instead of manual type-based parsing. This reuses the existing schema infrastructure and follows the same pattern as InMemoryTable for field value comparison. --------- Co-authored-by: Claude <noreply@anthropic.com> * Change ERC20 indexer test to use startBlock equal to endBlock (#899) Instead of scanning from block 0, set startBlock to match endBlock (10_861_674) for more efficient targeted block testing. Co-authored-by: Claude <noreply@anthropic.com> * Apply tsx for TestIndexer worker thread * Final fixes * Fix tsx in worker * Fix erc20 test * Increase mocha timeout to 30s for erc20_multichain_factory tests (#901) Co-authored-by: Claude <noreply@anthropic.com> * Iterate over update.history in TestIndexer.handleWriteBatch (#902) Previously, handleWriteBatch only inspected update.latestChange, skipping earlier entries in update.history. This change mirrors PgStorage.res behavior by iterating over all history entries and applying Set/Delete logic for each. Includes a fallback to process latestChange when history is empty for backwards compatibility. Co-authored-by: Claude <noreply@anthropic.com> --------- Co-authored-by: Claude <noreply@anthropic.com>
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.
Previously, handleWriteBatch only inspected update.latestChange, skipping earlier entries in update.history. This change mirrors PgStorage.res behavior by iterating over all history entries and applying Set/Delete logic for each.
Includes a fallback to process latestChange when history is empty for backwards compatibility.