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

fix(cat-gateway): Correct Service Health logic #1974

Open
wants to merge 54 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
54 commits
Select commit Hold shift + click to select a range
3e87af3
wip(rust/signed_doc): add atomic variables for live check, update end…
saibatizoku Feb 20, 2025
4b1a6aa
wip(rust/signed_doc): reset live counter
saibatizoku Feb 20, 2025
4e0d843
fix(cat-gateway): typo
saibatizoku Feb 20, 2025
03d7e7d
fix(cat-gateway): use timestamp for LIVE_COUNTER, update logic
saibatizoku Feb 25, 2025
87b4a2b
fix(cat-gateway): refactor code into health utilities
saibatizoku Feb 25, 2025
2933466
fix(cat-gateway): fix panic catcher to disable live service flag
saibatizoku Feb 25, 2025
0c6a28b
fix(cat-gateway): remove unused atomic-counter crate
saibatizoku Feb 25, 2025
c69eb77
fix(cat-gateway): refactor health::live utilities into proper module
saibatizoku Feb 25, 2025
e8196c4
fix(cat-gateway): restore live counter logic, set env var for threshold
saibatizoku Feb 25, 2025
92e20c2
fix(cat-gateway): code format
saibatizoku Feb 25, 2025
090a503
fix(cat-gateway): return service unavailable with proper error
saibatizoku Feb 26, 2025
5d4b5d9
fix(cat-gateway): refactor health::start utilities into proper module
saibatizoku Feb 26, 2025
7ddb1bc
feat(cat-gateway): add service::utilities::health::ready module
saibatizoku Feb 25, 2025
8b848ee
wip(rust/signed_doc): add atomic variables for live check, update end…
saibatizoku Feb 20, 2025
e24d875
wip(rust/signed_doc): reset live counter
saibatizoku Feb 20, 2025
9c6468e
fix(cat-gateway): typo
saibatizoku Feb 20, 2025
adb2cff
fix(cat-gateway): use timestamp for LIVE_COUNTER, update logic
saibatizoku Feb 25, 2025
fa0a94b
fix(cat-gateway): refactor code into health utilities
saibatizoku Feb 25, 2025
f7650f3
fix(cat-gateway): fix panic catcher to disable live service flag
saibatizoku Feb 25, 2025
400d04f
fix(cat-gateway): remove unused atomic-counter crate
saibatizoku Feb 25, 2025
d7890dd
fix(cat-gateway): refactor health::live utilities into proper module
saibatizoku Feb 25, 2025
7da190d
fix(cat-gateway): restore live counter logic, set env var for threshold
saibatizoku Feb 25, 2025
2fe0c92
fix(cat-gateway): code format
saibatizoku Feb 25, 2025
bfe01f9
fix(cat-gateway): return service unavailable with proper error
saibatizoku Feb 26, 2025
f006db3
Merge branch 'fix/service-liveness-check' into fix/service-started-check
saibatizoku Feb 26, 2025
5000831
Merge branch 'fix/service-started-check' into fix/service-readiness-c…
saibatizoku Feb 26, 2025
3482a78
fix(cat-gateway): add atomic vars to health::started to keep track an…
saibatizoku Feb 26, 2025
a8d0508
fix(cat-gateway): add atomic var to health::started to keep track of …
saibatizoku Feb 27, 2025
7284980
Merge remote-tracking branch 'origin/main' into fix/service-started-c…
saibatizoku Feb 27, 2025
759df0a
fix(cat-gateway): implement logic for health::started flags
saibatizoku Feb 27, 2025
0bbde73
Merge remote-tracking branch 'origin/main' into fix/service-started-c…
saibatizoku Feb 27, 2025
8412c25
Merge branch 'fix/service-started-check' into fix/service-readiness-c…
saibatizoku Feb 27, 2025
2832b38
Merge remote-tracking branch 'origin/main' into fix/service-started-c…
saibatizoku Mar 4, 2025
8d1b0d7
Merge branch 'fix/service-started-check' into fix/service-readiness-c…
saibatizoku Mar 4, 2025
b9f33a9
Merge remote-tracking branch 'origin/main' into fix/health-probe-logic
saibatizoku Mar 6, 2025
82b0760
fix(cat-gateway): add middleware to check DB connections
saibatizoku Mar 6, 2025
8c970c5
fix(cat-gateway): attempt DB reconnect if health/ready check fails
saibatizoku Mar 6, 2025
30d6172
fix(cat-gateway): implement logic for health::ready endpoint
saibatizoku Mar 7, 2025
3bf2daf
Merge remote-tracking branch 'origin/main' into fix/health-probe-logic
saibatizoku Mar 7, 2025
7b81d79
fix(cat-gateway): handle DB errors at endpoints
saibatizoku Mar 7, 2025
e2b11bd
Merge remote-tracking branch 'origin/main' into fix/health-probe-logic
saibatizoku Mar 7, 2025
de54387
Merge branch 'main' into fix/health-probe-logic
saibatizoku Mar 17, 2025
bc1b9a2
chore(cat-gateway): fix doc comments
saibatizoku Mar 18, 2025
e089bdc
fix(cat-gateway): add suggested fixes
saibatizoku Mar 18, 2025
9fd1958
Merge branch 'main' into fix/health-probe-logic
saibatizoku Mar 18, 2025
e8647ac
fix(cat-gateway): simplify boolean logic, correctly set flag when fol…
saibatizoku Mar 18, 2025
d76bd59
Merge remote-tracking branch 'origin/main' into fix/health-probe-logic
saibatizoku Mar 18, 2025
33b8b11
fix(cat-gateway): add suggested fix
saibatizoku Mar 18, 2025
d759cbe
chore(docs): fix doc comment
saibatizoku Mar 18, 2025
f7e3f9d
Merge branch 'main' into fix/health-probe-logic
saibatizoku Mar 19, 2025
f583340
fix(cat-gateway): update doc comments for health endpoints
saibatizoku Mar 20, 2025
dd4d1c7
Merge branch 'main' into fix/health-probe-logic
saibatizoku Mar 24, 2025
6402dd9
fix(cat-gateway): add suggested fix to doc comments
saibatizoku Mar 24, 2025
af2b4d5
Merge remote-tracking branch 'origin/main' into fix/health-probe-logic
saibatizoku Mar 24, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(cat-gateway): simplify boolean logic, correctly set flag when fol…
…lower first syncs
saibatizoku committed Mar 18, 2025

Verified

This commit was signed with the committer’s verified signature.
saibatizoku Joaquín Rosales
commit e8647ac1fef7999237f7f2f3d923792e0e1f1525
9 changes: 3 additions & 6 deletions catalyst-gateway/bin/src/cardano/mod.rs
Original file line number Diff line number Diff line change
@@ -45,11 +45,8 @@ pub async fn index_db_is_ready() -> bool {
let is_ready = CassandraSession::wait_until_ready(INDEXING_DB_READY_WAIT_INTERVAL, true)
.await
.is_ok();
if is_ready {
set_index_db_liveness(true);
} else {
set_index_db_liveness(false);
}
// Set the Indexing DB service liveness flag
set_index_db_liveness(is_ready);
is_ready
}

@@ -536,7 +533,7 @@ impl SyncTask {
self.start_immutable_followers();

// Update flag if this is the first time reaching TIP.
if follower_has_first_reached_tip() {
if !follower_has_first_reached_tip() {
set_follower_first_reached_tip();
}
} else {