mreutegg commented on code in PR #1800:
URL: https://github.com/apache/jackrabbit-oak/pull/1800#discussion_r1802781196
##########
oak-segment-remote/src/main/java/org/apache/jackrabbit/oak/segment/remote/RemoteUtilities.java:
##########
@@ -28,6 +28,7 @@
public final class RemoteUtilities {
public static final boolean OFF_HEAP = getBoolean("access.off.heap");
public static final String SEGMENT_FILE_NAME_PATTERN =
"^([0-9a-f]{4})\\.([0-9a-f-]+)$";
+ public static final int MAX_ENTRY_COUNT = 0x10000;
Review Comment:
Ah, yes. You are right. RemoteUtilities.getSegmentFileName() takes a
position (index) and not an entry count. The test should rather to the
following.
```
@Test
public void maxEntryCount() {
UUID uuid = UUID.randomUUID();
String name =
RemoteUtilities.getSegmentFileName(RemoteUtilities.MAX_ENTRY_COUNT - 1,
uuid.getMostSignificantBits(), uuid.getLeastSignificantBits());
UUID parsed = RemoteUtilities.getSegmentUUID(name);
assertEquals(uuid, parsed);
}
```
--
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]