You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
node_1.filter!(node_1.putTransaction);
node_2.putTransaction(...); // triggers gossiping to node 1's putTransactionThread.sleep(500.msecs);
node_1.clearFilter(); // after this point the retry mechanism of a node could make the request succeed
However this has a crucial assumption: that the putTransaction of node_2 is an asynchronous call. If it's not, then the main thread will block, node_2 will have its putTransaction request fail after a number of retries, and by that point the node_1.clearFilter call in the main thread will be too late.
It makes more sense to make this timeout built-in into Localrest, to make it usable with blocking APIs. The new code (assuming putTransaction is now blocking) would look like:
node_1.filter!(node_1.putTransaction, 500.msecs);
node_2.putTransaction(...);
// now check if gossiping succeeded, or if max retries were reached
The text was updated successfully, but these errors were encountered:
Can multiple pairs of filtered 'method and timeout' register?
If the filter is registered and a clearFilter() was received before the timeout period, is the filter valid?
Does timeout have a bigger priority than ClearFilter()?
Or is the filter automatically turned off after the time limit?
When I opened this issue, I had a talk with @Geod24. The conclusion was that we probably don't need this feature. So I would ignore this issue for now until we re-visit it later @MukeunKim.
Currently the
filter
Control API is used like so:However this has a crucial assumption: that the
putTransaction
ofnode_2
is an asynchronous call. If it's not, then the main thread will block,node_2
will have itsputTransaction
request fail after a number of retries, and by that point thenode_1.clearFilter
call in the main thread will be too late.It makes more sense to make this timeout built-in into Localrest, to make it usable with blocking APIs. The new code (assuming putTransaction is now blocking) would look like:
The text was updated successfully, but these errors were encountered: