Open yinweiishere opened 7 years ago
background: controller needs wait for entry being processed by writer. We need callback after entry persisted.
walk around: condition wait
TBD: optimize to implement callback mechanism.
will work on it next week
Background: From one handler to the other, the two thread pools are synced by the blocking event queue. Usually, event will be piped to the last handler and thus finishes the whole handling. But some handlers may expect post handler's result, no matter success or error. Especially, it will facilitate error handling. Say, in SG client, connection will generate the original journal entry. For any of its post handlers: processor or writer, any failure inside could call connection's callback to reply success/error to iscsi. Callbacks could be pushed into the event's context as a stack, and thus be called one by one.