Browse Source

correct sequence generating

git-svn-id: https://weed-fs.googlecode.com/svn/trunk@30 282b0af5-e82d-9cf1-ede4-77906d7719d0
pull/2/head
chris.lu@gmail.com 13 years ago
parent
commit
60c17068a6
  1. 2
      weed-fs/src/cmd/weeds.go
  2. 1
      weed-fs/src/pkg/directory/volume_mapping.go

2
weed-fs/src/cmd/weeds.go

@ -43,7 +43,9 @@ func dirJoinHandler(w http.ResponseWriter, r *http.Request) {
publicUrl := r.FormValue("publicUrl")
volumes := new([]storage.VolumeInfo)
json.Unmarshal([]byte(r.FormValue("volumes")), volumes)
if *IsDebug {
log.Println(s, "volumes", r.FormValue("volumes"))
}
mapper.Add(*directory.NewMachine(s, publicUrl, *volumes))
}
func dirStatusHandler(w http.ResponseWriter, r *http.Request) {

1
weed-fs/src/pkg/directory/volume_mapping.go

@ -69,6 +69,7 @@ func (m *Mapper) PickForWrite() (string, MachineInfo) {
func (m *Mapper) NextFileId() uint64 {
if m.fileIdCounter <= 0 {
m.fileIdCounter = FileIdSaveInterval
m.FileIdSequence += FileIdSaveInterval
m.saveSequence()
}
m.fileIdCounter--

Loading…
Cancel
Save