devsisters / shardcake

Sharding and location transparency for Scala
https://devsisters.github.io/shardcake/
Apache License 2.0
382 stars 29 forks source link

[Interruption] if entity terminates, and then shard shuts down, entity termination is not waited #84

Closed mattiamanzati closed 1 year ago

mattiamanzati commented 1 year ago

When an entity starts to terminate, it forks daemon the interruption effect and removes the entities from the alive set. If shard interruption occurs and completes before that entity fully shutdown, entity termination will not complete.

Sample test written in typescript: https://github.com/mattiamanzati/shardcake/blob/dca200d6c6c3d10a18379355cc23c74fab6338cf/test/SampleTests.ts#L292-L344

ghostdogpr commented 1 year ago

You're right, it should be waiting on the promise created earlier from terminateEntity. I will fix it.