aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/transactionlogstress/translogstress.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-08-27 15:12:43 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-08-27 15:12:43 +0000
commit6d26d9a1fb8ccdcc2b930f9ce3561820fb84acae (patch)
treef8acec783931ca4517cda8e5d46f2e7f2d4b971e /searchlib/src/tests/transactionlogstress/translogstress.cpp
parent2a9d62ac9c68731a46f53a6b80224c053a7b01ec (diff)
Style chnages
Diffstat (limited to 'searchlib/src/tests/transactionlogstress/translogstress.cpp')
-rw-r--r--searchlib/src/tests/transactionlogstress/translogstress.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp
index 81a3006dbff..013ca81dcc9 100644
--- a/searchlib/src/tests/transactionlogstress/translogstress.cpp
+++ b/searchlib/src/tests/transactionlogstress/translogstress.cpp
@@ -8,7 +8,6 @@
#include <vespa/searchlib/index/dummyfileheadercontext.h>
#include <vespa/fastos/app.h>
#include <iostream>
-#include <stdexcept>
#include <sstream>
#include <thread>
@@ -223,7 +222,6 @@ FeederThread::~FeederThread() = default;
void
FeederThread::commitPacket()
{
- _packet.close();
const vespalib::nbostream& stream = _packet.getHandle();
if (!_session->commit(ConstBufferRef(stream.data(), stream.size()))) {
throw std::runtime_error(vespalib::make_string
@@ -238,8 +236,9 @@ FeederThread::commitPacket()
bool
FeederThread::addEntry(const Packet::Entry & e)
{
- //LOG(info, "FeederThread: add %s", EntryPrinter::toStr(e).c_str());
- return _packet.add(e);
+ if (_packet.sizeBytes() > 0xf000) return false;
+ _packet.add(e);
+ return true;
}
void