PokIsemaine commented on code in PR #2332:
URL: https://github.com/apache/kvrocks/pull/2332#discussion_r1715335015


##########
src/storage/storage.cc:
##########
@@ -587,15 +588,20 @@ Status Storage::GetWALIter(rocksdb::SequenceNumber seq, 
std::unique_ptr<rocksdb:
 
 rocksdb::SequenceNumber Storage::LatestSeqNumber() { return 
db_->GetLatestSequenceNumber(); }
 
-rocksdb::Status Storage::Get(const rocksdb::ReadOptions &options, const 
rocksdb::Slice &key, std::string *value) {
-  return Get(options, db_->DefaultColumnFamily(), key, value);
+rocksdb::Status Storage::Get(engine::Context &ctx, const rocksdb::ReadOptions 
&options, const rocksdb::Slice &key,
+                             std::string *value) {
+  return Get(ctx, options, db_->DefaultColumnFamily(), key, value);
 }
 
-rocksdb::Status Storage::Get(const rocksdb::ReadOptions &options, 
rocksdb::ColumnFamilyHandle *column_family,
-                             const rocksdb::Slice &key, std::string *value) {
+rocksdb::Status Storage::Get(engine::Context &ctx, const rocksdb::ReadOptions 
&options,
+                             rocksdb::ColumnFamilyHandle *column_family, const 
rocksdb::Slice &key,
+                             std::string *value) {
+  DCHECK_EQ(ctx.snapshot->GetSequenceNumber(), 
options.snapshot->GetSequenceNumber());
   rocksdb::Status s;
   if (is_txn_mode_ && txn_write_batch_->GetWriteBatch()->Count() > 0) {
     s = txn_write_batch_->GetFromBatchAndDB(db_.get(), options, column_family, 
key, value);
+  } else if (ctx.batch) {

Review Comment:
   Ah thanks, I missed the modification here



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to