vmware / vmware-go-kcl-v2

vmware-go-kcl is a vmware originated open-source project for AWS Kinesis Client Library in Go. It has been widely used by many external companies and internally by Carbon Black. vmware-go-kcl-v2 is its companion project by utilizing AWS Go SDK V2 which introduces lots of breaking changes. To keep the repo clean, it is better to have a separated repo vmware-go-kcl-v2 with better golang project structure improvement.
MIT License
23 stars 17 forks source link

fix: add DeleteMetricMillisBehindLatest for error case #18

Closed spentakota closed 1 year ago

spentakota commented 1 year ago

In case of error when getting records there is a need to delete the MillisBehindLatest metric for the specific shard to eliminate inconsistencies with logging the metric. Returning at this point effectively releases the lease for the shard and hence the lease can be potentially acquired by other consumers in the system (Could be from the same pod or other pods). If the lease is acquired by another consumer in a different pod this metric would continue to be collected for this shard from the same pod as well as the new pod. To prevent such a situation delete the metric from this pod so that it is correctly collected.

vmwclabot commented 1 year ago

@spentakota, you must sign every commit in this pull request acknowledging our Developer Certificate of Origin before your changes are merged. This can be done by adding Signed-off-by: John Doe <john.doe@email.org> to the last line of each Git commit message. The e-mail address used to sign must match the e-mail address of the Git author. Click here to view the Developer Certificate of Origin agreement.