Open logarithm opened 6 years ago
What is your goal in deleting the lease from DynamoDB?
It's not our goal to delete lease from DynamoDB, just highlighted the case when it's silently dies, but I think it might be better if it fails with error, or even handle that situation, because data lost can happen, despite that it's a rare case.
The use case for cleaning the DynamoDB is to start a hot replay of the consumer without restarting it. Less of an issue for us, because our consumers are running in Kubernetes; so we just scale the appropriate stateful set to 0, wipe out the table, then restart them with appropriate point to replay from. For someone running them in actual EC2s restarting nodes / re-deploying to replay may be annoying.
If we delete lease record in DDB while consumers are running, then neither consumer which was holding lease nor any other currently running consumers consume from that shard. Only restart helps.
Second consumer: