mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-09-23 04:03:35 +08:00
fix leader master /dir/lookup api
Signed-off-by: Lei Liu <lei01.liu@horizon.ai>
This commit is contained in:
@@ -15,12 +15,12 @@ func NewMemorySequencer() (m *MemorySequencer) {
|
||||
return
|
||||
}
|
||||
|
||||
func (m *MemorySequencer) NextFileId(count uint64) (uint64, uint64) {
|
||||
func (m *MemorySequencer) NextFileId(count uint64) uint64 {
|
||||
m.sequenceLock.Lock()
|
||||
defer m.sequenceLock.Unlock()
|
||||
ret := m.counter
|
||||
m.counter += uint64(count)
|
||||
return ret, count
|
||||
m.counter += count
|
||||
return ret
|
||||
}
|
||||
|
||||
func (m *MemorySequencer) SetMax(seenValue uint64) {
|
||||
|
@@ -1,7 +1,7 @@
|
||||
package sequence
|
||||
|
||||
type Sequencer interface {
|
||||
NextFileId(count uint64) (uint64, uint64)
|
||||
NextFileId(count uint64) uint64
|
||||
SetMax(uint64)
|
||||
Peek() uint64
|
||||
}
|
||||
|
Reference in New Issue
Block a user