Skip to content

Commit 860ffb1

Browse files
committed
changes from review
1 parent e66a4e1 commit 860ffb1

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

core/sail/lmdb/src/main/java/org/eclipse/rdf4j/sail/lmdb/ValueStore.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ private void open() throws IOException {
343343
mdb_stat(txn, unusedDbi, stat);
344344
if (stat.ms_entries() > 0) {
345345
// free unused IDs
346-
resizeMap(txn, stat.ms_entries() * (2 + Long.BYTES));
346+
resizeMap(txn, stat.ms_entries() * (2L + Long.BYTES));
347347

348348
writeTransaction((stack2, txn2) -> {
349349
freeUnusedIdsAndValues(stack2, txn2, null);
@@ -671,7 +671,7 @@ private long findId(byte[] data, boolean create) throws IOException {
671671
return null;
672672
}
673673
// id was not found, create a new one
674-
resizeMap(txn, 2L * data.length + 4L);
674+
resizeMap(txn, 2L * data.length + 2L * (2L + Long.BYTES));
675675

676676
long newId = nextId(data[0]);
677677
writeTransaction((stack2, writeTxn) -> {
@@ -714,7 +714,7 @@ private long findId(byte[] data, boolean create) throws IOException {
714714
return null;
715715
}
716716

717-
resizeMap(txn, 2L * data.length + 2L * 2L);
717+
resizeMap(txn, 2L * data.length + 2L * (2L + Long.BYTES));
718718

719719
long newId = nextId(data[0]);
720720
writeTransaction((stack2, writeTxn) -> {
@@ -773,7 +773,7 @@ private long findId(byte[] data, boolean create) throws IOException {
773773
}
774774

775775
// id was not found, create a new one
776-
resizeMap(txn, 1 + Long.BYTES + maxHashKeyLength + 2 * data.length);
776+
resizeMap(txn, 1 + Long.BYTES + maxHashKeyLength + 2L * data.length);
777777

778778
long newId = nextId(data[0]);
779779
writeTransaction((stack2, writeTxn) -> {
@@ -1155,7 +1155,7 @@ public void startTransaction(boolean resize) throws IOException {
11551155
mdb_stat(writeTxn, unusedDbi, stat);
11561156

11571157
if (resize) {
1158-
resizeMap(writeTxn, stat.ms_entries() * (2 + Long.BYTES));
1158+
resizeMap(writeTxn, stat.ms_entries() * (2L + Long.BYTES));
11591159
}
11601160

11611161
freeUnusedIdsAndValues(stack, writeTxn, unusedRevisionIds);

0 commit comments

Comments
 (0)