From 9d4ffab29b6fb7b902a7bfe1c9f167a22fa8f06a Mon Sep 17 00:00:00 2001 From: Cassandra Heart Date: Tue, 26 Sep 2023 01:25:16 -0500 Subject: [PATCH] fix: byte slice disappearance issue for key too --- node/store/clock.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/node/store/clock.go b/node/store/clock.go index 67f8a38..4fd0911 100644 --- a/node/store/clock.go +++ b/node/store/clock.go @@ -275,7 +275,9 @@ func extractFrameNumberAndFilterFromMasterFrameKey( ) } - return binary.BigEndian.Uint64(key[2:10]), key[10:], nil + copied := make([]byte, len(key)) + copy(copied, key) + return binary.BigEndian.Uint64(copied[2:10]), copied[10:], nil } func clockDataFrameKey(