-
Committer:
Stewart Smith
-
Date:
2010-09-30 08:18:51 UTC
-
Revision ID:
stewart@flamingspork.com-20100930081851-nhjvy9aqryq19k2q
Add an API for trx_is_interrupted.
At various points in execution, HailDB checks if it has been asked to kill a particular transaction.
It does this by calling trx_is_interrupted(). This patch adds a API
function to set a callback that is called from txr_is_interrupted().
Currently the only real place that can be cancelled is online create secondary index.
The ib_trx_is_interrupted test checks just about all combinations of this.
API users will have to ib_trx_set_client_data(trx,void*) for each transaction they want to be able to make a decision about if it has been killed. Globally, having ib_set_trx_is_interrupted_handler() set is also required.
HailDB never dereferences the client_data pointer - it treats it as completely opaque.