This is an automated email from the ASF dual-hosted git repository.

hulk pushed a commit to branch unstable
in repository https://gitbox.apache.org/repos/asf/kvrocks-controller.git


The following commit(s) were added to refs/heads/unstable by this push:
     new d11ae9d  Fix nil pointer when print MigratingSlot string function 
(#332)
d11ae9d is described below

commit d11ae9d10d540af7aff9b1a1ca847e44dc85a55f
Author: Lele Huang <[email protected]>
AuthorDate: Mon Aug 4 12:26:28 2025 +0800

    Fix nil pointer when print MigratingSlot string function (#332)
---
 store/slot.go | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/store/slot.go b/store/slot.go
index 448002e..d44dd9c 100644
--- a/store/slot.go
+++ b/store/slot.go
@@ -49,6 +49,13 @@ type MigratingSlot struct {
        IsMigrating bool
 }
 
+func (migratingSlot *MigratingSlot) String() string {
+       if migratingSlot == nil {
+               return ""
+       }
+       return migratingSlot.SlotRange.String()
+}
+
 func NewSlotRange(start, stop int) (SlotRange, error) {
        if start > stop {
                return SlotRange{}, errors.New("start was larger than stop")

Reply via email to