Skip to content
Snippets Groups Projects
Unverified Commit e2fc9caf authored by Manish R Jain's avatar Manish R Jain
Browse files

potential solution

parent c91159b7
No related branches found
No related tags found
No related merge requests found
...@@ -861,6 +861,11 @@ func RebuildIndex(ctx context.Context, attr string, startTs uint64) error { ...@@ -861,6 +861,11 @@ func RebuildIndex(ctx context.Context, attr string, startTs uint64) error {
var err error var err error
txn := &Txn{StartTs: startTs} txn := &Txn{StartTs: startTs}
for it := range ch { for it := range ch {
// TODO: One way to solve this problem is to keep adding postings to txn, until
// txn.deltas grows to a certain size. And then do a CommitMutations to disk.
// That way, we can use different start->commit timestamps, to keep the deltas
// staggered in terms of versioning. And once we're done, we can run the rollup
// system to generate the final posting lists.
addPostingsToIndex(it.uid, it.list, txn) addPostingsToIndex(it.uid, it.list, txn)
// NOTE: This has to be in memory for performance. // NOTE: This has to be in memory for performance.
err = txn.CommitMutationsMemory(ctx, txn.StartTs) err = txn.CommitMutationsMemory(ctx, txn.StartTs)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment