diff options
author | Matt Joiner <anacrolix@gmail.com> | 2021-03-11 11:46:23 +1100 |
---|---|---|
committer | Matt Joiner <anacrolix@gmail.com> | 2021-03-11 11:46:23 +1100 |
commit | bccbd0ef92dcffec775e5deb187fb91f41c71f28 (patch) | |
tree | dcb61cf92ee6632e430af7502e0346d2e22b98a8 /tx.go | |
parent | skip the retry profile Add (diff) | |
download | stm-bccbd0ef92dcffec775e5deb187fb91f41c71f28.tar.gz stm-bccbd0ef92dcffec775e5deb187fb91f41c71f28.tar.xz |
Remove retry profiles on Tx recycle
This may fix a memory leak where the *Tx in retry profile keys holds on to old Tx and their writes.
Diffstat (limited to 'tx.go')
-rw-r--r-- | tx.go | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -145,6 +145,9 @@ func (tx *Tx) recycle() { delete(tx.watching, v) v.watchers.Delete(tx) } + tx.removeRetryProfiles() + // I don't think we can reuse Txs, because the "completed" field should/needs to be set + // indefinitely after use. //txPool.Put(tx) } |