mynameborat opened a new pull request #1355: URL: https://github.com/apache/samza/pull/1355
**Issue**: In EpochTimeScheduler, when the caller tries to register a duplicate timer with new callback, Samza throws an exception. This behavior prevents callers from updating the callbacks for a given timer key. **Changes**: Allow registration for duplicate timer key where the newer callback will overwrite the previous callback provided it can be canceled. Refer to API changes section for semantics change to the existing API. **Tests**: Added unit tests to validate scenarios where duplicate registration succeeds vs no-ops. **API Changes**: `setTimer` API now allows duplicate timer registration. The semantics of the duplicate registration is as follows 1. Duplicate registrations will attempt the cancel the previously registered callbacks. If its unsuccessful, the new request to register the timer will be ignored. 2. If the previously registered callback has been fired successfully at the time of the new request, the new request will be fulfilled. This is to ensure we remain consistent and stay inline with the current semantics. **Upgrade Instructions**: None **Usage Instructions**: None ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected]
