Closed tayfunelmas closed 3 days ago
LGTM
Just for my understanding, was this column only used for testing resharding, but not in the actual resharding logic?
Yes, it is only used for testing the resharding logic, there is no read from the column in non-test code.
Attention: Patch coverage is 21.42857%
with 11 lines
in your changes missing coverage. Please review.
Project coverage is 71.76%. Comparing base (
8463ac2
) to head (5bc21db
).
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This addresses the issue in #11605. It allows to re-enable GC in testloop.
ReceiptIdToShardId column has not been updated and GC'ed consistently (which manifest itself as testloop failures when GC is enabled as indicated in #11605): 1) save_receipt_id_to_shard_id_for_block is not called in 2 paths in state sync (
set_state_finalize
) and catchup (block_catch_up_postprocess
). This breaks the invariant that ReceiptIdToShardId is saved whenever OutgoingReceipts are saved. 2) GC does not check shard-tracking info and existence of the refcount when decrementing refcount of ReceiptIdToShardId if it exists in GC.Since ReceiptIdToShardId is used to check certain conditions during resharding and not read in production, instead of fixing the situation (as in https://github.com/near/nearcore/pull/11668), we deprecate the column, remove the read and write operations to the column, and implement a new DB version that deleted the info in the column.
This PR replaces https://github.com/near/nearcore/pull/11668.