Browse Source

fix sequence assignment error

pull/2/head
Chris Lu 12 years ago
parent
commit
6658d5de45
  1. 2
      go/sequence/sequence.go

2
go/sequence/sequence.go

@ -62,7 +62,7 @@ func (m *SequencerImpl) NextFileId(count int) (uint64, int) {
m.saveSequence() m.saveSequence()
} }
m.fileIdCounter = m.fileIdCounter - uint64(count) m.fileIdCounter = m.fileIdCounter - uint64(count)
return m.FileIdSequence - m.fileIdCounter, count
return m.FileIdSequence - m.fileIdCounter - uint64(count), count
} }
func (m *SequencerImpl) saveSequence() { func (m *SequencerImpl) saveSequence() {
log.Println("Saving file id sequence", m.FileIdSequence, "to", path.Join(m.dir, m.fileName+".seq")) log.Println("Saving file id sequence", m.FileIdSequence, "to", path.Join(m.dir, m.fileName+".seq"))

Loading…
Cancel
Save