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


##########
src/cluster/slot_migrate.cc:
##########
@@ -1259,7 +1264,7 @@ Status SlotMigrator::sendSnapshotByRawKV() {
 
     
GET_OR_RET(batch_sender.Put(storage_->GetCFHandle(ColumnFamilyID::Metadata), 
iter.Key(), iter.Value()));
 
-    auto subkey_iter = iter.GetSubKeyIterator();
+    auto subkey_iter = iter.GetSubKeyIterator(ctx);

Review Comment:
   This is actually a passive modification: Storage::NewIterator=> 
SubKeyIterator ctor => GetSubKeyIterator
   ```
   rocksdb::Iterator *Storage::NewIterator(engine::Context &ctx, const 
rocksdb::ReadOptions &options,
                                           rocksdb::ColumnFamilyHandle 
*column_family) {
     DCHECK_EQ(ctx.snapshot->GetSequenceNumber(), 
options.snapshot->GetSequenceNumber());
     auto iter = db_->NewIterator(options, column_family);
     if (is_txn_mode_ && txn_write_batch_->GetWriteBatch()->Count() > 0) {
       return txn_write_batch_->NewIteratorWithBase(column_family, iter, 
&options);
     } else if (ctx.batch && ctx.batch->GetWriteBatch()->Count() > 0) {
       return ctx.batch->NewIteratorWithBase(column_family, iter, &options); // 
<== HERE
     }
     return iter;
   }
   ```



-- 
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