Commit 472d16cf authored by Kirill Smelkov's avatar Kirill Smelkov

.

parent 4cc79d6f
...@@ -687,17 +687,15 @@ func Open(ctx context.Context, path string, opt *zodb.DriverOptions) (_ *FileSto ...@@ -687,17 +687,15 @@ func Open(ctx context.Context, path string, opt *zodb.DriverOptions) (_ *FileSto
log.Print(err) log.Print(err)
log.Printf("%s: index rebuild...", path) log.Printf("%s: index rebuild...", path)
index, err = BuildIndex(ctx, fseq, nil/*no progress; XXX log it? */) index, err = BuildIndex(ctx, fseq, nil/*no progress; XXX log it? */)
// XXX cause=ErrUnexpectedEOF -> let watcher decide what was } else {
// it: garbage or in-progress transaction // index loaded. In particular this gives us index.TopPos that is, possibly
if err != nil { // outdated, valid position for start of a transaction in the data file.
return nil, err // Update the index starting from that till latest transaction.
} err = index.Update(ctx, fseq, -1, nil/*no progress; XXX log it? */)
} }
// index loaded. In particular this gives us index.TopPos that is, possibly // XXX cause=ErrUnexpectedEOF -> let watcher decide what was
// outdated, valid position for start of a transaction in the data file. // it: garbage or in-progress transaction
// Update the index starting from that till latest transaction.
err = index.Update(ctx, fseq, -1, nil/*no progress; XXX log it? */)
if err != nil { if err != nil {
return nil, err return nil, err
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment