tju-yxq opened a new issue, #2641:
URL: https://github.com/apache/rocketmq-dashboard/issues/2641

   `CollectorScheduler` acquires the native-alert database lease once at the 
beginning of a collection pass. It only calls `tryAcquire()` again from 
`persist()` when a collector returned samples.
   
   A pass that takes longer than the lease duration while all collectors return 
empty lists therefore stops touching `rmq_alert_collection_lease`. After the 
row expires, another Studio replica can acquire the lease and start the same 
pass while the first replica is still contacting brokers. The first replica may 
also continue running until a later non-empty result notices that it no longer 
owns the lease.
   
   This is separate from #1776/#1781, which addressed the legacy collection 
executor's `DiscardOldestPolicy`; this report is about lease ownership for the 
native alert collector introduced by #2533.
   
   ### Reproduction
   
   1. Configure a short `studio.alerting.collection-lease-duration` (or use a 
collection pass that lasts longer than the default `PT1M`).
   2. Let a native collector spend longer than that duration returning no 
samples.
   3. While the first pass is still running, attempt to acquire the same lease 
from a second Studio replica.
   
   ### Expected behavior
   
   The active pass should renew its lease while it is running, including passes 
that produce no samples. If renewal fails, it should stop scheduling or 
persisting further work instead of continuing as the active collector.
   
   ### Current behavior
   
   There is no renewal while an empty pass is running, so the database lease 
can expire and ownership can overlap across replicas.
   


-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to