Skip to content
This repository was archived by the owner on Apr 4, 2025. It is now read-only.

[wip] E35#957

Open
awskii wants to merge 872 commits into
mainfrom
e35
Open

[wip] E35#957
awskii wants to merge 872 commits into
mainfrom
e35

Conversation

@awskii
Copy link
Copy Markdown
Contributor

@awskii awskii commented Mar 27, 2023

No description provided.

Comment thread 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()
Copy link
Copy Markdown
Contributor

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

Comment thread state/domain.go Outdated

"github.com/RoaringBitmap/roaring/roaring64"
btree2 "github.com/tidwall/btree"
atomic2 "go.uber.org/atomic"
Copy link
Copy Markdown
Contributor

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

Comment thread state/domain_mem.go Outdated
}

func (l *KVList) Reset() {
//l.Keys = l.Keys[:0]
Copy link
Copy Markdown
Contributor

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.

Comment thread state/domain_mem.go Outdated
*Domain

etl *etl.Collector
mu sync.RWMutex
Copy link
Copy Markdown
Contributor

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?

Comment thread 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:])
Copy link
Copy Markdown
Contributor

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants