summaryrefslogtreecommitdiff
path: root/cpp/src/qpid/linearstore/journal/JournalFile.cpp
diff options
context:
space:
mode:
authorKim van der Riet <kpvdr@apache.org>2014-01-15 22:33:26 +0000
committerKim van der Riet <kpvdr@apache.org>2014-01-15 22:33:26 +0000
commit529e96771b64b4cd48ba35ea264b640aa23bb260 (patch)
tree7f6e8d25a2eff29c79212b04063b7a8e73cf88e6 /cpp/src/qpid/linearstore/journal/JournalFile.cpp
parent933c1e55c55edcd84756431790c04de113046afa (diff)
downloadqpid-python-529e96771b64b4cd48ba35ea264b640aa23bb260.tar.gz
QPID-5484 [linearstore] Poor performance relative to legacystore. Partial fix: The use of /dev/random exhausts the kernel's supply of non-deterministic random data, and calls to read from it block until enough is available. It has been determined that /dev/urandom is good enough for this use-case (Journal serial numbers), and does not suffer from blocking.
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1558592 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'cpp/src/qpid/linearstore/journal/JournalFile.cpp')
-rw-r--r--cpp/src/qpid/linearstore/journal/JournalFile.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/cpp/src/qpid/linearstore/journal/JournalFile.cpp b/cpp/src/qpid/linearstore/journal/JournalFile.cpp
index 8f6a311a84..129a9145d0 100644
--- a/cpp/src/qpid/linearstore/journal/JournalFile.cpp
+++ b/cpp/src/qpid/linearstore/journal/JournalFile.cpp
@@ -279,7 +279,7 @@ const std::string JournalFile::getFileName() const {
//static
uint64_t JournalFile::getRandom64() {
- int randomData = ::open("/dev/random", O_RDONLY);
+ int randomData = ::open("/dev/urandom", O_RDONLY);
if (randomData < 0) {
throw jexception(); // TODO: Complete exception details
}