Skip to content

Commit

Permalink
Fix bug where we remove padding from sync record on some requests
Browse files Browse the repository at this point in the history
  • Loading branch information
Lev Berman authored and JamesPiechota committed May 31, 2024
1 parent cf63ab2 commit 7452ed6
Showing 1 changed file with 0 additions and 18 deletions.
18 changes: 0 additions & 18 deletions apps/arweave/src/ar_data_sync.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1641,24 +1641,6 @@ read_chunk_with_metadata(
{error, chunk_not_found};
{ok, _, {AbsoluteOffset, _, _, _, _, _, ChunkSize}}
when AbsoluteOffset - SeekOffset >= ChunkSize ->
case ar_sync_record:delete(AbsoluteOffset - ChunkSize, SeekOffset - 1, ?MODULE,
StoreID) of
ok ->
Modules = ar_storage_module:get_all(SeekOffset),
ModuleIDs = [ar_storage_module:id(Module) || Module <- Modules],
?LOG_ERROR([{event, clean_up_sync_record_false_positive},
{tags, [solution_proofs]},
{seek_offset, SeekOffset},
{end_offset, AbsoluteOffset},
{store_id, StoreID},
{stored_packing, ar_chunk_storage:encode_packing(StoredPacking)},
{modules_covering_seek_offset, ModuleIDs},
{chunk_size, ChunkSize}]);
Err ->
?LOG_ERROR([{event, failed_to_clean_up_sync_record},
{tags, [solution_proofs]},
{error, io_lib:format("~p", [Err])}])
end,
{error, chunk_not_found};
{ok, _, {AbsoluteOffset, ChunkDataKey, TXRoot, _, TXPath, _, ChunkSize}} ->
ReadFun =
Expand Down

0 comments on commit 7452ed6

Please sign in to comment.