Skip to content

Commit

Permalink
[Java]: make sure to cast termLength to long so that 1GB term lengths…
Browse files Browse the repository at this point in the history
… compute correct log length.
  • Loading branch information
tmontgomery committed Aug 8, 2018
1 parent f22f3bb commit 5adceef
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ public static long computeLogLength(final int termLength, final int filePageSize
return align((termLength * PARTITION_COUNT) + LOG_META_DATA_LENGTH, filePageSize);
}

return (PARTITION_COUNT * termLength) + align(LOG_META_DATA_LENGTH, filePageSize);
return (PARTITION_COUNT * (long)termLength) + align(LOG_META_DATA_LENGTH, filePageSize);
}

/**
Expand Down

0 comments on commit 5adceef

Please sign in to comment.