Skip to content

Commit

Permalink
fix manifest LSN issue
Browse files Browse the repository at this point in the history
Signed-off-by: Qi Xu <[email protected]>
  • Loading branch information
Qi Xu committed Mar 22, 2024
1 parent e5ba415 commit e344ae5
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions db/wal_edit.cc
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,9 @@ void WalAddition::EncodeTo(std::string* dst) const {
if (metadata_.HasSyncedSize()) {
PutVarint32(dst, static_cast<uint32_t>(WalAdditionTag::kSyncedSize));
PutVarint64(dst, metadata_.GetSyncedSizeInBytes());
PutVarint32(dst, static_cast<uint32_t>(WalAdditionTag::kLastSyncSeq));
PutVarint64(dst, metadata_.GetLastSequence());
}
PutVarint32(dst, static_cast<uint32_t>(WalAdditionTag::kLastSyncSeq));
PutVarint64(dst, metadata_.GetLastSequence());

PutVarint32(dst, static_cast<uint32_t>(WalAdditionTag::kTerminate));
}
Expand Down Expand Up @@ -151,6 +151,7 @@ Status WalSet::AddWal(const WalAddition& wal) {

// Update synced size for the given WAL.
it->second.SetSyncedSizeInBytes(wal.GetMetadata().GetSyncedSizeInBytes());
it->second.SetLastSequence(wal.GetMetadata().GetLastSequence());
return Status::OK();
}

Expand Down

0 comments on commit e344ae5

Please sign in to comment.