Skip to content

Commit

Permalink
Merge pull request #15514 from mattgbio/skip-initial-crc-TDBStore
Browse files Browse the repository at this point in the history
TDBSTore: skip data CRC when building RAM table
  • Loading branch information
0xc0170 authored Jun 8, 2024
2 parents 5249bb9 + 3082c28 commit 5cb118b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions storage/kvstore/tdbstore/source/TDBStore.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -374,6 +374,10 @@ int TDBStore::read_record(uint8_t area, uint32_t offset, char *key,

if (calc_hash) {
hash = calc_crc(hash, chunk_size, dest_buf);
#ifdef KVSTORE_RAM_TABLE_NO_CRC_CHECK
next_offset = align_up(offset + total_size, _prog_size);
return ret;
#endif /* KVSTORE_RAM_TABLE_NO_CRC_CHECK */
}

user_key_ptr += chunk_size;
Expand Down

0 comments on commit 5cb118b

Please sign in to comment.