-
Notifications
You must be signed in to change notification settings - Fork 137
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
Use unsaved in-memory commits during key list re-construction #3486
Conversation
@@ -635,23 +636,77 @@ protected void validateHashExists(OP_CONTEXT ctx, Hash hash) throws ReferenceNot | |||
*/ | |||
protected abstract List<CommitLogEntry> fetchPageFromCommitLog(OP_CONTEXT ctx, List<Hash> hashes); | |||
|
|||
private List<CommitLogEntry> fetchPageFromCommitLog( |
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.
Mind renaming this to fetchMultipleFromCommitLog
? I think, the term "page" is wrong here (and actually always was - it was just used to fetch a whole page).
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.
renamed (in a separate commit for ease of review)
Codecov Report
@@ Coverage Diff @@
## main #3486 +/- ##
============================================
+ Coverage 86.62% 86.66% +0.03%
- Complexity 3032 3043 +11
============================================
Files 376 376
Lines 16377 16411 +34
Branches 1207 1213 +6
============================================
+ Hits 14186 14222 +36
+ Misses 1746 1745 -1
+ Partials 445 444 -1
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
* Allow the unsaved in-memory commits built during merge / transplant operations to be found during key list re-construction. * Skip the in-memory lookup in the common case of non-merge call paths to reduce the amount of transient lists (parameters and results). * Parameterize merge / transplant test cases for full coverage of related code. Fixes projectnessie#3466
49f3e83
to
1a86023
Compare
BranchName main = BranchName.of("main"); | ||
BranchName branch = BranchName.of("branch"); | ||
BranchName conflict = BranchName.of("conflict"); | ||
|
||
databaseAdapter.create(branch, databaseAdapter.hashOnReference(main, Optional.empty())); | ||
|
||
Hash[] commits = new Hash[3]; | ||
Hash[] commits = new Hash[numCommits]; |
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.
I remember that my PR for same issue got blocked because there was no strict validation. But this PR also don't have any validation but went ahead.
I am not sure I understand the process here.
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.
Your change was complex and changed the algorithm/implementation to generate the key-lists.
Dmitri's change did not change that algorithm.
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.
I also checked code coverage in IntelliJ (manually) - all branches in the new if
statements were covered :)
Allow the unsaved in-memory commits built during merge / transplant
operations to be found during key list re-construction.
Skip the in-memory lookup in the common case of non-merge call
paths to reduce the amount of transient lists (parameters and
results).
Parameterize merge / transplant test cases for full coverage
of related code.
Fixes #3466