From e2fc9caff40d98d15379d00ab96528439c4d6a3c Mon Sep 17 00:00:00 2001
From: Manish R Jain <manish@dgraph.io>
Date: Tue, 10 Jul 2018 19:44:05 -0700
Subject: [PATCH] potential solution

---
 posting/index.go | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/posting/index.go b/posting/index.go
index de4f5f6f..7fb8d16b 100644
--- a/posting/index.go
+++ b/posting/index.go
@@ -861,6 +861,11 @@ func RebuildIndex(ctx context.Context, attr string, startTs uint64) error {
 			var err error
 			txn := &Txn{StartTs: startTs}
 			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)
 				// NOTE: This has to be in memory for performance.
 				err = txn.CommitMutationsMemory(ctx, txn.StartTs)
-- 
GitLab