Added the print statement
diff --git a/storage/SeparateChainingHashTable.hpp b/storage/SeparateChainingHashTable.hpp
index 4b46e30..b8f62dd 100644
--- a/storage/SeparateChainingHashTable.hpp
+++ b/storage/SeparateChainingHashTable.hpp
@@ -719,7 +719,7 @@
for (;;) {
// Save the address;
std::size_t existing_chain_ptr = pending_chain_ptr->load(std::memory_order_release);
-
+ std::cout << "CAS" << std::endl;
// Make bucket's (new head) ptr to hold address of old head.
buckets_next_ptr->store(existing_chain_ptr, std::memory_order_release);
if (pending_chain_ptr->compare_exchange_strong(existing_chain_ptr,
@@ -729,46 +729,6 @@
}
}
return HashTablePutResult::kOK;
-
- // OLD CODE
- // for (;;) {
- // if (locateBucketForInsertion(hash_code,
- // 0,
- // &bucket,
- // &pending_chain_ptr,
- // &pending_chain_ptr_finish_value,
- // prealloc_state)) {
- // // Found an empty bucket.
- // break;
- // } else if (bucket == nullptr) {
- // // Ran out of buckets. Deallocate any variable space that we were unable
- // // to use.
- // DEBUG_ASSERT(prealloc_state == nullptr);
- // key_manager_.deallocateVariableLengthKeyStorage(variable_key_size);
- // return HashTablePutResult::kOutOfSpace;
- // } else {
- // // Hash collision found, and duplicates aren't allowed.
- // DEBUG_ASSERT(!allow_duplicate_keys);
- // DEBUG_ASSERT(prealloc_state == nullptr);
- // if (key_manager_.scalarKeyCollisionCheck(key, bucket)) {
- // // Duplicate key. Deallocate any variable storage space and return.
- // key_manager_.deallocateVariableLengthKeyStorage(variable_key_size);
- // return HashTablePutResult::kDuplicateKey;
- // }
- // }
- // }
-
- // // Write the key and hash.
- // writeScalarKeyToBucket(key, hash_code, bucket, prealloc_state);
-
- // // Store the value by using placement new with ValueT's copy constructor.
- // new(static_cast<char*>(bucket) + kValueOffset) ValueT(value);
-
- // // Update the previous chain pointer to point to the new bucket.
- // pending_chain_ptr->store(pending_chain_ptr_finish_value, std::memory_order_release);
-
- // We're all done.
- //return HashTablePutResult::kOK;
}
template <typename ValueT,