Skip to content
Permalink
Browse files
GEODE-6233: Use a new hash-map for each PutAll batch in PrePopulateRe…
…gion (#31)

We see an occasional delay/hang when simply clearing and reusing the same
hashmap for multiple putAll requests.  This change creates a new hashmap every
time it starts a new batch.

This also increases the keyRange for the benchmarks from 10k to 1M.

Co-Authored-By: Helena Bales <hbales@pivotal.io>
  • Loading branch information
Brian Rowe and nonbinaryprogrammer committed Dec 21, 2018
1 parent 46b2653 commit 0d18cbd6502a235d1797d2097da3750d6269f013
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
@@ -131,7 +131,7 @@ private void doPuts(Map<Long, Portfolio> region, long lowBound, long highBound)

if (putIndex % getBatchSize() == 0) {
region.putAll(valueMap);
valueMap.clear();
valueMap = new HashMap<>();
}
}

@@ -37,7 +37,7 @@
*/
public class PartitionedGetBenchmark implements PerformanceTest {

private long keyRange = 10000;
private long keyRange = 1000000;

@Test
public void run() throws Exception {
@@ -36,7 +36,7 @@
*/
public class PartitionedPutBenchmark implements PerformanceTest {

private long keyRange = 10000;
private long keyRange = 1000000;

public PartitionedPutBenchmark() {}

@@ -37,7 +37,7 @@
*/
public class ReplicatedGetBenchmark implements PerformanceTest {

private long keyRange = 10000;
private long keyRange = 1000000;

@Test
public void run() throws Exception {
@@ -36,7 +36,7 @@
*/
public class ReplicatedPutBenchmark implements PerformanceTest {

private long keyRange = 10000;
private long keyRange = 1000000;

public ReplicatedPutBenchmark() {}

0 comments on commit 0d18cbd

Please sign in to comment.