-
Notifications
You must be signed in to change notification settings - Fork 1.5k
perf(core): Introduce mutable map struct #9199
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6fdd230
to
2f48d14
Compare
mangalaman93
requested changes
Oct 24, 2024
hYuang
reviewed
Oct 26, 2024
8497e3d
to
34d455d
Compare
shivaji-kharse
previously approved these changes
Nov 5, 2024
mangalaman93
requested changes
Nov 13, 2024
mangalaman93
requested changes
Nov 29, 2024
00ba427
to
3332561
Compare
24d9a43
to
a8fa85e
Compare
mangalaman93
approved these changes
Dec 6, 2024
// We choose to write the PL at r.startTs, so it won't be read by txns, | ||
// which occurred before this schema mutation. | ||
e := &badger.Entry{ | ||
Key: kv.Key, | ||
Value: kv.Value, | ||
UserMeta: BitCompletePosting, | ||
} | ||
|
||
if len(kv.Value) == 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.
we should just update the UserMeta in the if condition for clarity
@@ -1024,17 +1019,22 @@ func (r *rebuilder) Run(ctx context.Context) error { | |||
if err := proto.Unmarshal(slice, kv); err != nil { | |||
return err | |||
} | |||
if len(kv.Value) == 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.
just make sure that we do not get into this case frequently for index keys
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
area/core
internal mechanisms
area/testing
Testing related issues
go
Pull requests that update Go code
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently the delta postings are being stored inside a map. When we are using cache, these deltas gets unnecessarily copied again and again because of the limitations of map. We have introduced a new struct, that would allow us to work on the list of
deltas.
With the introduction of this, we can now without copying the map, can pass around lists from one transaction to another without issue.
We are also going to store results like delete markers, uid to posting map and other stuff required to make queries go faster.