[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Query termination clariffication



> Arie Shoshani wrote:
> > "Done" issued by the QO means, on the other hand, that the QO does
> > not need to communicate with the QE any further.  It may or may not
> > have EIs still active.  In this case, the QE can clear the query from
> > the cache, but does NOT notify the QM. Thus the QM continues to
> > cache files for all EIs associated with this queries till they got
> > the last file.
> > 
> 
> One more thing on this part:
> Then, when does QM clear the query from the cache?

QM clears the query from its cache when the last file for that query
is given to it, AND all the files were released for that query by the
EIs.   

> Currently, the only way to gracely "finish" the query for QM is
> getting a "done" or "abort" from QE. 

Only "abort" is needed for interrupting a query execution.  "Done" is
not needed because all files for that query will be eventually given to 
the EIs and will be released.  Then the QM can consider the query
done.

> QE doesn't keep track of EIs that are still active, so it doesn't
> know if the query is actually finished. 

It is not necessary to keep track of EIs, only of the files given to
them.  To detect an EI that crashed the time-out on files that were
not released will do that with the "are you alive" method (not
implemented yet).

> QM can send a message to QE when the query is finished, but
> then QE needs to distinguish the "done" from QO and from QM.
> If QE cleared the cache for that particular query already, and 
> the query is done, QE needs to inform QM for its "done" or
> "deletion"....

This is not necessary if we agree that QE will be notified with a
"done" by QO.  Henrik said the same in his message.

Arie