Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMS: Move and rewrite check_unlocked_replicas #148

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

voetberg
Copy link
Contributor

@voetberg voetberg commented Aug 7, 2024

  • Use sqla2.0 (broken into base statement and modifications)
  • Change gauge to prometheuspusher
  • Update Header
  • Sort imports
  • change except to except Exception

Updated queries compile to:

SELECT count(*) AS count_1 
FROM dev.replicas 
WHERE dev.replicas.tombstone IS NOT NULL AND dev.replicas.tombstone < :tombstone_1

SELECT count(*) AS count_1 
FROM dev.replicas 
WHERE dev.replicas.tombstone IS NOT NULL

The query for expired replicas has the extra condition tombstone < sysdate - 2/24' but I can't get my head around why that offset (of milliseconds?) is there to begin with, so if there need to be modifications let me know.

* Use sqla2.0 (broken into base statement and modifications)
* Change gauge to prometheuspusher
* Update Header
* Sort imports
* change except to except Exception
@voetberg voetberg requested a review from dchristidis as a code owner August 7, 2024 14:17
@dchristidis
Copy link
Contributor

Please consult #140.

@voetberg voetberg changed the title Common: Rewrite check_unlocked_replicas CMS: Move and rewrite check_unlocked_replicas Aug 7, 2024
@voetberg voetberg added the CMS label Aug 7, 2024
@dchristidis dchristidis linked an issue Aug 7, 2024 that may be closed by this pull request
@dchristidis
Copy link
Contributor

The query for expired replicas has the extra condition tombstone < sysdate - 2/24' but I can't get my head around why that offset (of milliseconds?) is there to begin with, so if there need to be modifications let me know.

2/24 means two hours. My impression is that it’s as if this probe was written in a different era where all the Reapers run in greedy mode. Hence, tombstone < now is the Reaper backlog and tombstone < now -2h means that something may be wrong.

In my personal opinion, this is pointless. However, it could be that I missed something so I wish to understand how CMS is using this before finalising the move away from common.

@voetberg voetberg self-assigned this Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Retire check_unlocked_replicas
2 participants