Skip to content

Commit

Permalink
nbhm bug: K == TOMBSTONE not key == TOMBSTONE
Browse files Browse the repository at this point in the history
  • Loading branch information
spennihana committed Jul 17, 2015
1 parent fbb4407 commit efb80e4
Showing 1 changed file with 4 additions and 15 deletions.
19 changes: 4 additions & 15 deletions h2o-core/src/main/java/water/nbhm/NonBlockingHashMap.java
@@ -1,25 +1,14 @@
package water.nbhm;
import sun.misc.Unsafe;

import java.io.IOException;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.AbstractCollection;
import java.util.AbstractMap;
import java.util.AbstractSet;
import java.util.Collection;
import java.util.ConcurrentModificationException;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Hashtable;
import java.util.Iterator;
import java.util.Map;
import java.util.NoSuchElementException;
import java.util.Set;
import java.util.*;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.atomic.AtomicLongFieldUpdater;
import java.util.concurrent.atomic.AtomicReferenceFieldUpdater;

import sun.misc.Unsafe;

/*
* Written by Cliff Click and released to the public domain, as explained at
* http://creativecommons.org/licenses/publicdomain
Expand Down Expand Up @@ -619,7 +608,7 @@ private static final Object getk_impl( final NonBlockingHashMap topmap, final Ob
// needs to force a table-resize for a too-long key-reprobe sequence.
// Check for too-many-reprobes on get - and flip to the new table.
if( ++reprobe_cnt >= reprobe_limit(len) || // too many probes
key == TOMBSTONE ) { // found a TOMBSTONE key, means no more keys in this table
K == TOMBSTONE ) { // found a TOMBSTONE key, means no more keys in this table
if( newkvs == READONLY ) return null; // Missed in a locked table
return newkvs == null ? null : getk_impl(topmap,topmap.help_copy(newkvs),key); // Retry in the new table
}
Expand Down

0 comments on commit efb80e4

Please sign in to comment.