diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2018-01-12 10:03:27 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-12 10:03:27 +0100 |
commit | 9eb3a77a2b9d62ff5db5e10fd646badbbe73d701 (patch) | |
tree | 1275176f2bb794c41e757827fea575e39f441c98 /searchlib/src/tests/transactionlogstress/translogstress.cpp | |
parent | 87d6777412738c155bb776b1be257e53dc7137e7 (diff) |
Revert "Revert "Balder/group multiple commits rebased 1""
Diffstat (limited to 'searchlib/src/tests/transactionlogstress/translogstress.cpp')
-rw-r--r-- | searchlib/src/tests/transactionlogstress/translogstress.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/searchlib/src/tests/transactionlogstress/translogstress.cpp b/searchlib/src/tests/transactionlogstress/translogstress.cpp index abba84b75b6..6f2581d3799 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 @@ -699,7 +698,7 @@ TransLogStress::Main() // start transaction log server DummyFileHeaderContext fileHeaderContext; - TransLogServer tls("server", 17897, ".", fileHeaderContext, _cfg.domainPartSize); + TransLogServer tls("server", 17897, ".", fileHeaderContext, DomainConfig().setPartSizeLimit(_cfg.domainPartSize)); TransLogClient client(tlsSpec); client.create(domain); |