Skip to content

Commit

Permalink
Fix[mqbs::DataStoreRecordKeyHashAlgo]: prevent trivial collisions (bl…
Browse files Browse the repository at this point in the history
…oomberg#387)


Signed-off-by: Evgeny Malygin <[email protected]>
  • Loading branch information
678098 authored and alexander-e1off committed Oct 24, 2024
1 parent cf9e20c commit a4b6436
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/groups/mqb/mqbs/mqbs_datastore.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// BlazingMQ storage mechanism testable.

// MQB

#include <mqbi_dispatcher.h>
#include <mqbi_storage.h>
#include <mqbs_filestoreprotocol.h>
Expand Down Expand Up @@ -834,7 +833,7 @@ inline DataStoreRecordKeyHashAlgo::result_type
DataStoreRecordKeyHashAlgo::operator()(const TYPE& type) const
{
return type.d_sequenceNum +
static_cast<bsls::Types::Uint64>(type.d_primaryLeaseId);
(static_cast<bsls::Types::Uint64>(type.d_primaryLeaseId) << 32);
}

// -----------------------------
Expand Down

0 comments on commit a4b6436

Please sign in to comment.