This PR fixes a potential memory issue in the receiving side of the ReliableMessage.
When a request is received, a RequestReceiver object is created and kept in a table. Currently, after the request is finished, we still keep the RequestReceiver object in the table. RM has a monitoring process that will eventually release the object from the table. However this could take many minutes (depending on how tx_timeout is configured) before this happens. The problem is that all reply messages (could be very big) will remain in the table until the monitoring process remove them. This could potentially cause OOM if there are many requests in quick succession.
This PR solve this problem by releasing the RequestReceiver object immediately after the request is done and replied successfully. For requests that cannot be replied successfully, the RequestReceiver object will still remain in the table such that the requester can query it later. But the object will only stay in the table for tx_timeout seconds.
Types of changes
[x] Non-breaking change (fix or new feature that would not break existing functionality).
[ ] Breaking change (fix or new feature that would cause existing functionality to change).
[ ] New tests added to cover the changes.
[ ] Quick tests passed locally by running ./runtest.sh.
Fixes # .
Description
This PR fixes a potential memory issue in the receiving side of the ReliableMessage.
When a request is received, a RequestReceiver object is created and kept in a table. Currently, after the request is finished, we still keep the RequestReceiver object in the table. RM has a monitoring process that will eventually release the object from the table. However this could take many minutes (depending on how tx_timeout is configured) before this happens. The problem is that all reply messages (could be very big) will remain in the table until the monitoring process remove them. This could potentially cause OOM if there are many requests in quick succession.
This PR solve this problem by releasing the RequestReceiver object immediately after the request is done and replied successfully. For requests that cannot be replied successfully, the RequestReceiver object will still remain in the table such that the requester can query it later. But the object will only stay in the table for tx_timeout seconds.
Types of changes
./runtest.sh
.