Distributed Query

16 views
Skip to first unread message

Michael Alexeev

unread,
May 1, 2012, 11:51:10 AM5/1/12
to voltdb-dev
Hi All,

Let say we have a simple ‘select * from t;’ where t is a distributed
table. The access plan is
SEND
RECEIVE
SEND
SEQSCAN

Which results in two fragments SEND/RECEIVE and SEND/SEQSCAN. The
first fragment will be executed once on the coordinator node and the
second fragment will be executed multiple times – once per each
distributed node. Is it more or less accurate? If this is the case, I
can’t find the loop over the fragments. The loop over the partitions
are within the ReceiveExecutor::p_execute method

ReceiveExecutor::p_execute {
do {
loadedDeps =
engine->loadNextDependency(output_table);
} while (loadedDeps > 0);
}

But I can’t find any place where VoltDBEngine::executePlanFragment is
called in a loop.

Mike

Paul Martel

unread,
May 2, 2012, 10:04:51 AM5/2/12
to voltd...@googlegroups.com
Mike,
Even the distributed fragment only gets executed once -- once per node -- in its own invocation of the execution engine.
The loop would be in the Java code that services the client's query request, forwarding the first fragment for execution on
a coordinator node and forwarding the distributed fragment for execution on the other nodes.
--paul

mike alexeev

unread,
May 2, 2012, 11:06:31 AM5/2/12
to voltd...@googlegroups.com
Thanks Paul. Makes sense. I was running into few issues trying to make distributed query pull-aware. The distributed fragment now seems to be working fine but the coordinator always returns an empty set. Will take a look today/tomorrow.
 
Mike

Paul Martel

unread,
May 2, 2012, 12:51:01 PM5/2/12
to voltd...@googlegroups.com
Mike,
In my review, I think that I found a code path that could have the effect of results getting thrown out prematurely.
I want to try to test a patch for it and a few other cleanups before posting it to your repo -- today, I hope.
--paul
Reply all
Reply to author
Forward
0 new messages