aboutsummaryrefslogtreecommitdiffstats
path: root/storage
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2023-10-17 21:24:28 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2023-10-17 21:24:28 +0000
commit1e1177e32619601f790c1d221e7bf5355c2f9c1e (patch)
tree5b22d4ca5d6ad2f87731c9c023b305342ca94e32 /storage
parent771b853b8a0b13a476854eed4e98317d02232ebc (diff)
Move xxh3_64 methods to vespalib. That also removes the need for workarounds for GCC false positives.
Diffstat (limited to 'storage')
-rw-r--r--storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
index 582b67a4dbc..a96bee2d11a 100644
--- a/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
+++ b/storage/src/vespa/storage/persistence/filestorage/filestorhandlerimpl.cpp
@@ -14,7 +14,6 @@
#include <vespa/vespalib/stllike/hash_map.hpp>
#include <vespa/vespalib/util/exceptions.h>
#include <vespa/vespalib/util/string_escape.h>
-#include <xxhash.h>
#include <vespa/log/log.h>
LOG_SETUP(".persistence.filestor.handler.impl");
@@ -896,14 +895,7 @@ FileStorHandlerImpl::flush()
uint64_t
FileStorHandlerImpl::dispersed_bucket_bits(const document::Bucket& bucket) noexcept {
- const uint64_t raw_id = bucket.getBucketId().getId();
- /*
- * This is a workaround for gcc 12 and on that produces incorrect warning when compiled with -march=haswell or newer
- * See document/src/vespa/document/bucket/bucketid.cpp: In member function ‘uint64_t document::BucketId::hash::operator()(const document::BucketId&) const
- */
- uint8_t raw_as_bytes[sizeof(raw_id)];
- memcpy(raw_as_bytes, &raw_id, sizeof(raw_id));
- return XXH3_64bits(&raw_as_bytes, sizeof(raw_id));
+ return vespalib::xxhash::xxh3_64(bucket.getBucketId().getId());
}
FileStorHandlerImpl::Stripe::Stripe(const FileStorHandlerImpl & owner, MessageSender & messageSender)