mapleFU commented on code in PR #2389:
URL: https://github.com/apache/kvrocks/pull/2389#discussion_r1676822936


##########
src/cluster/slot_migrate.h:
##########
@@ -190,9 +191,9 @@ class SlotMigrator : public redis::Database {
   UniqueFD dst_fd_;
 
   MigrationType migration_type_ = MigrationType::kRedisCommand;
-  std::atomic<int16_t> forbidden_slot_ = -1;
-  std::atomic<int16_t> migrating_slot_ = -1;
-  int16_t migrate_failed_slot_ = -1;
+  std::atomic<SlotRange> forbidden_slot_range_ = SlotRange{-1, -1};
+  std::atomic<SlotRange> slot_range_ = SlotRange{-1, -1};

Review Comment:
   Yeah, I think a compile time `is_always_lock_free` is better here, currently 
two integer will not meet any problem but If future somebody change this to 
more than 8B this should be take care of



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