Created
September 13, 2023 06:35
-
-
Save spikeekips/51fabda7e78b36d51570ad9ac39b97c2 to your computer and use it in GitHub Desktop.
Revisions
-
spikeekips created this gist
Sep 13, 2023 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,20 @@ diff --git isaac/block/localfs_writer.go isaac/block/localfs_writer.go index 9bdfa2b9..d963da88 100644 --- isaac/block/localfs_writer.go +++ isaac/block/localfs_writer.go @@ -146,6 +146,7 @@ func (w *LocalFSWriter) SetOperationsTree(ctx context.Context, tw *fixedtree.Wri func(ctx context.Context, _ uint64) error { _ = w.opsf.Close() + if l := atomic.LoadUint64(&w.lenops); l > 0 { if err := w.m.SetItem(NewLocalBlockMapItem( base.BlockMapItemTypeOperations, w.opsf.Checksum(), @@ -153,6 +154,7 @@ func (w *LocalFSWriter) SetOperationsTree(ctx context.Context, tw *fixedtree.Wri )); err != nil { return errors.Wrap(err, "set operations") } + } return nil },