From 90182e97fe26c8c6e49169bc12cb468531bd7074 Mon Sep 17 00:00:00 2001 From: chrislu Date: Tue, 25 Jun 2024 09:18:11 -0700 Subject: [PATCH] remove unused function --- weed/sequence/memory_sequencer.go | 4 ---- weed/sequence/sequence.go | 1 - weed/sequence/snowflake_sequencer.go | 5 ----- 3 files changed, 10 deletions(-) diff --git a/weed/sequence/memory_sequencer.go b/weed/sequence/memory_sequencer.go index 6e879bd79..92944266c 100644 --- a/weed/sequence/memory_sequencer.go +++ b/weed/sequence/memory_sequencer.go @@ -30,7 +30,3 @@ func (m *MemorySequencer) SetMax(seenValue uint64) { m.counter = seenValue + 1 } } - -func (m *MemorySequencer) Peek() uint64 { - return m.counter -} diff --git a/weed/sequence/sequence.go b/weed/sequence/sequence.go index 2258d001b..49de63b73 100644 --- a/weed/sequence/sequence.go +++ b/weed/sequence/sequence.go @@ -3,5 +3,4 @@ package sequence type Sequencer interface { NextFileId(count uint64) uint64 SetMax(uint64) - Peek() uint64 } diff --git a/weed/sequence/snowflake_sequencer.go b/weed/sequence/snowflake_sequencer.go index b63198349..05694f681 100644 --- a/weed/sequence/snowflake_sequencer.go +++ b/weed/sequence/snowflake_sequencer.go @@ -42,8 +42,3 @@ func (m *SnowflakeSequencer) NextFileId(count uint64) uint64 { // ignore setmax as we are snowflake func (m *SnowflakeSequencer) SetMax(seenValue uint64) { } - -// return a new id as no Peek is stored -func (m *SnowflakeSequencer) Peek() uint64 { - return uint64(m.node.Generate().Int64()) -}