aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/tests/transactionlogstress/translogstress.cpp
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-10-20 18:28:29 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2018-01-10 09:56:23 +0100
commita2433d41489b18bd2f1e785cd9dd15a30e609857 (patch)
tree6314bacd22b418094305dc7a301fced01b2e90f5 /searchlib/src/tests/transactionlogstress/translogstress.cpp
parent11c077cb1d5e9b0672331c865cd4ec9fe879e171 (diff)
Refactor Packet and read of TLS.
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 abba84b75b6..62ef49ff689 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 <vespa/log/log.h>
@@ -221,7 +220,6 @@ FeederThread::~FeederThread() {}
void
FeederThread::commitPacket()
{
- _packet.close();
const vespalib::nbostream& stream = _packet.getHandle();
if (!_session->commit(ConstBufferRef(stream.c_str(), stream.size()))) {
throw std::runtime_error(vespalib::make_string
@@ -236,8 +234,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