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

Query termination



Enclosed are some notes I took from our discussions on the
termination of a query that is executing.  These functions do not
exist at this time, so they have to be implemented by the next
version.  They has implication to the QO, QE, QM, and EIs.

Note: I refer below to the "get" and "set" calls from the EI to the QM
as "request" and "retrieve", as we agreed.

1) There are two forms of termination of a query:
  a) "abort" -- which means interrupt query and terminate it
     gracefully.  In this case, the QE can clean its cache immediately,
     and notifies the QM.  QM moves the query to "done list", and
     responds to all EI "request" and "retrieve"
  b) "done" -- which means I am done with the query, but there may
     still be EIs working.  In this case, the QE can clean its cache,
     but does not notify the QM.  The QM continues to process the query
     until all files are delivered.

2) A query is considered done when the last file for that query
is delivered by the storage manager.  Thus, the QM can put it on the
"done list".  There is no need to notify the QE.  The QE may have
gotten a "done" message already.

3) The Query Object may send a "done" message to the QE either before
or after all EIs finish processing the query.  However, it is useful
for the QE to know as soon as possible so it can free the cache space
used by the query.  One way to achieve that is for each EI to notify
the QO when it recieved "no more files".  The QO can send "done" to
the QE as soon as the first EI sends "no more files".

I hope I got this accurately.

Arie.