-
Notifications
You must be signed in to change notification settings - Fork 93
[wip] E35 #957
base: main
Are you sure you want to change the base?
Conversation
state/aggregator_v3.go
Outdated
| predicates.Add(1) | ||
| g.Go(func() (err error) { | ||
| mf.storage, mf.storageIdx, mf.storageHist, err = a.storage.mergeFiles(ctx, files.storage, files.storageIdx, files.storageHist, r.storage, workers) | ||
| predicates.Done() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
always call wg.Done in defer to avoid deadlocks on panic
state/domain.go
Outdated
|
|
||
| "github.com/RoaringBitmap/roaring/roaring64" | ||
| btree2 "github.com/tidwall/btree" | ||
| atomic2 "go.uber.org/atomic" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we dropped support of go1.18 in last release. now can use sync/atomic.Int32
state/domain_mem.go
Outdated
| } | ||
|
|
||
| func (l *KVList) Reset() { | ||
| //l.Keys = l.Keys[:0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer as the first step: get much green tests. And ten introduce prealloc/reset optimizations.
state/domain_mem.go
Outdated
| *Domain | ||
|
|
||
| etl *etl.Collector | ||
| mu sync.RWMutex |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need shared mutex between domains?
state/domain_mem.go
Outdated
| //} | ||
| return func(k []byte, value []byte, _ etl.CurrentTableReader, next etl.LoadNextFunc) error { | ||
| // if its ordered we could put to history each key excluding last one | ||
| tx := binary.BigEndian.Uint64(k[len(k)-8:]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tx variable name is reserved for Database Transaction
No description provided.