From a2433d41489b18bd2f1e785cd9dd15a30e609857 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Fri, 20 Oct 2017 18:28:29 +0200 Subject: Refactor Packet and read of TLS. --- searchlib/src/tests/transactionlogstress/translogstress.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'searchlib/src/tests/transactionlogstress/translogstress.cpp') 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 #include #include -#include #include #include @@ -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 -- cgit v1.2.3