stillalex commented on code in PR #2021:
URL: https://github.com/apache/solr/pull/2021#discussion_r1364202872


##########
solr/core/src/java/org/apache/solr/update/VersionBucket.java:
##########
@@ -31,14 +31,41 @@
  * ignores the <code>lockTimeoutMs</code>.
  */
 public class VersionBucket {
-  public long highest;
 
+  private long highest;
+
+  /**
+   * @param highest the initial value of this bucket highest version.
+   */
+  public VersionBucket(long highest) {
+    setHighestIfGreater(highest);

Review Comment:
   if I am reading the code correctly, this will be a noop because the 
`setHighestIfGreater ` method checks `if (highest != 0)` which coming from the 
constructor will always be false.
   [edit] ah nvm. it was the other method you introduced, not the original 
updateHighest, I was checking the wrong one, sorry for the noise



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to