Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
dgraph
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Mirror
dgraph
Commits
e2fc9caf
Unverified
Commit
e2fc9caf
authored
6 years ago
by
Manish R Jain
Browse files
Options
Downloads
Patches
Plain Diff
potential solution
parent
c91159b7
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
posting/index.go
+5
-0
5 additions, 0 deletions
posting/index.go
with
5 additions
and
0 deletions
posting/index.go
+
5
−
0
View file @
e2fc9caf
...
@@ -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
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment