Skip to content

Commit

Permalink
Table store can cause JVM to crash if may keys are added, closes #751
Browse files Browse the repository at this point in the history
  • Loading branch information
peter-lawrey committed Nov 5, 2020
1 parent 74ef430 commit 7b8c653
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public TableStore<T> build() {
try {
if (!readOnly && file.createNewFile() && !file.canWrite())
throw new IllegalStateException("Cannot write to tablestore file " + file);
MappedBytes bytes = MappedBytes.mappedBytes(file, 64 << 10, 16 << 10, readOnly);
MappedBytes bytes = MappedBytes.mappedBytes(file, 32 << 10, 32 << 10, readOnly);
// eagerly initialize backing MappedFile page - otherwise wire.writeFirstHeader() will try to lock the file
// to allocate the first byte store and that will cause lock overlap
bytes.readVolatileInt(0);
Expand Down

0 comments on commit 7b8c653

Please sign in to comment.