aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2016-11-22 11:38:07 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2016-11-22 20:37:26 +0000
commitbb7217282f13e86d8445dbc089cb9e8ecedf8783 (patch)
treeb762ba7c06da04513ebded4416ed3a7244aedd71 /searchlib
parenta6acf5fede56f4d2535b3c30bcc5824bf805c143 (diff)
Split up to avoid internal compiler error on gcc 6.2i with -Os
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/session.cpp27
-rw-r--r--searchlib/src/vespa/searchlib/transactionlog/session.h5
2 files changed, 19 insertions, 13 deletions
diff --git a/searchlib/src/vespa/searchlib/transactionlog/session.cpp b/searchlib/src/vespa/searchlib/transactionlog/session.cpp
index bbb786b25c3..fc5e94c1859 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/session.cpp
+++ b/searchlib/src/vespa/searchlib/transactionlog/session.cpp
@@ -51,6 +51,21 @@ Session::inSync() const
return _inSync;
}
+bool
+Session::visit(FastOS_FileInterface & file, DomainPart & dp) {
+ Packet packet;
+ bool more(false);
+ if (dp.isClosed()) {
+ more = dp.visit(file, _range, packet);
+ } else {
+ more = dp.visit(_range, packet);
+ }
+ if (packet.getHandle().size() > 0) {
+ send(packet);
+ }
+ return more;
+}
+
void
Session::visit()
{
@@ -62,17 +77,7 @@ Session::visit()
Fast_BufferedFile file;
file.EnableDirectIO();
for(bool more(true); ok() && more && (_range.from() < _range.to()); ) {
- LOG(debug, "[%d] : Visiting the interval %" PRIu64 " - %" PRIu64 " in subpart", _id, _range.from(), _range.to());
- Packet packet;
- if (dp->isClosed()) {
- more = dp->visit(file, _range, packet);
- } else {
- more = dp->visit(_range, packet);
- }
- if (packet.getHandle().size() > 0) {
- LOG(debug, "[%d] : Sending the interval %" PRIu64 " - %" PRIu64 ". Packet : [%" PRIu64 ", %" PRIu64 "]", _id, _range.from(), _range.to(), packet.range().from(), packet.range().to());
- send(packet);
- }
+ more = visit(file, *dp);
}
// Nothing more in this DomainPart, force switch to next one.
if (_range.from() < dp->range().to()) {
diff --git a/searchlib/src/vespa/searchlib/transactionlog/session.h b/searchlib/src/vespa/searchlib/transactionlog/session.h
index 432539e0e50..622caf4242f 100644
--- a/searchlib/src/vespa/searchlib/transactionlog/session.h
+++ b/searchlib/src/vespa/searchlib/transactionlog/session.h
@@ -11,6 +11,7 @@ namespace search {
namespace transactionlog {
class Domain;
+class DomainPart;
typedef std::shared_ptr<Domain> DomainSP;
class Session : public FRT_IRequestWait
@@ -38,8 +39,7 @@ private:
QPacket(SerialNum s, const Packet & p)
: _serial(s),
_packet(new Packet(p))
- {
- }
+ { }
SerialNum _serial;
std::unique_ptr<Packet> _packet;
};
@@ -75,6 +75,7 @@ private:
void visitOnly();
void subscribe();
void finalize();
+ bool visit(FastOS_FileInterface & file, DomainPart & dp) __attribute__((noinline));
int32_t rpc(FRT_RPCRequest * req);
int32_t rpcAsync(FRT_RPCRequest * req);
FRT_Supervisor & _supervisor;