Since #500, a spam-training sample's hold on a message's blob ends with the account's own copy of the message: samples::release() clears the sample's temporary blob link. The blob purge is what removes a SpamTrainingSample, and it finds one only through that link's value, once the link expires. With the link cleared early, nothing found the sample again, so its registry item and account index stayed behind for good, after the account was deleted too.
release() now reads the sample's id from the link before clearing it, and removes the registry item and its index in the same write.
Found by the system suite's account purge test ("Store is not empty": a leftover SpamTrainingSample), which has failed on main since #500, so the steps after it haven't run. With this change the whole system suite passes (run on a4723c51 plus this commit; on newer main it stops earlier, at the multi-tenancy check tenant.rs:1340, which isn't this change).
Since #500, a spam-training sample's hold on a message's blob ends with the account's own copy of the message: `samples::release()` clears the sample's temporary blob link. The blob purge is what removes a `SpamTrainingSample`, and it finds one only through that link's value, once the link expires. With the link cleared early, nothing found the sample again, so its registry item and account index stayed behind for good, after the account was deleted too.
`release()` now reads the sample's id from the link before clearing it, and removes the registry item and its index in the same write.
Found by the system suite's account purge test ("Store is not empty": a leftover SpamTrainingSample), which has failed on main since #500, so the steps after it haven't run. With this change the whole system suite passes (run on a4723c51 plus this commit; on newer main it stops earlier, at the multi-tenancy check `tenant.rs:1340`, which isn't this change).
Since #500, a spam-training sample's hold on a message's blob ends with
the account's own copy: release() clears the sample's temporary link.
The blob purge is what removes a SpamTrainingSample, and it finds one
only through that link's value once the link expires. With the link
cleared early, nothing found the sample again, so its registry item and
account index stayed behind for good, past the account's deletion.
release() now reads the sample's id from the link before clearing it,
and removes the registry item and its index in the same write.
The system suite's account purge test caught it ("Store is not empty":
a leftover SpamTrainingSample).
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Since #500, a spam-training sample's hold on a message's blob ends with the account's own copy of the message:
samples::release()clears the sample's temporary blob link. The blob purge is what removes aSpamTrainingSample, and it finds one only through that link's value, once the link expires. With the link cleared early, nothing found the sample again, so its registry item and account index stayed behind for good, after the account was deleted too.release()now reads the sample's id from the link before clearing it, and removes the registry item and its index in the same write.Found by the system suite's account purge test ("Store is not empty": a leftover SpamTrainingSample), which has failed on main since #500, so the steps after it haven't run. With this change the whole system suite passes (run on
a4723c51plus this commit; on newer main it stops earlier, at the multi-tenancy checktenant.rs:1340, which isn't this change).