mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-27 01:51:59 +00:00
Comment to new IProcessor method
This commit is contained in:
parent
6c9d037730
commit
223eee3f46
@ -221,6 +221,21 @@ public:
|
||||
throw Exception(ErrorCodes::NOT_IMPLEMENTED, "Method 'schedule' is not implemented for {} processor", getName());
|
||||
}
|
||||
|
||||
/* The method is called right after asynchronous job is done
|
||||
* i.e. when file descriptor returned by schedule() is readable.
|
||||
* The sequence of method calls:
|
||||
* ... prepare() -> schedule() -> onAsyncJobReady() -> work() ...
|
||||
* See also comment to schedule() method
|
||||
*
|
||||
* It allows doing some preprocessing immediately after asynchronous job is done.
|
||||
* The implementation should return control quickly, to avoid blocking another asynchronous completed jobs
|
||||
* created by the same pipeline.
|
||||
*
|
||||
* Example, scheduling tasks for remote workers (file descriptor in this case is a socket)
|
||||
* When the remote worker asks for the next task, doing it in onAsyncJobReady() we can provide it immediately.
|
||||
* Otherwise, the returning of the next task for the remote worker can be delayed by current work done in the pipeline
|
||||
* i.e. processor->work(), which will create unnecessary latency in query processing by remote workers Not Committed Yet
|
||||
*/
|
||||
virtual void onAsyncJobReady() {}
|
||||
|
||||
/** You must call this method if 'prepare' returned ExpandPipeline.
|
||||
|
Loading…
Reference in New Issue
Block a user