Bug/core metrics db #1582

Merged
mfreeman451 merged 41 commits from refs/pull/1582/head into main 2025-05-02 18:50:20 +00:00
mfreeman451 commented 2025-05-02 06:34:24 +00:00 (Migrated from github.com)
Owner

Imported from GitHub pull request.

Original GitHub pull request: #708
Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/708
Original created: 2025-05-02T06:34:24Z
Original updated: 2025-05-02T18:50:37Z
Original head: carverauto/serviceradar:bug/core_metrics_db
Original base: main
Original merged: 2025-05-02T18:50:20Z by @mfreeman451

No description provided.

Imported from GitHub pull request. Original GitHub pull request: #708 Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/708 Original created: 2025-05-02T06:34:24Z Original updated: 2025-05-02T18:50:37Z Original head: carverauto/serviceradar:bug/core_metrics_db Original base: main Original merged: 2025-05-02T18:50:20Z by @mfreeman451 --- _No description provided._
mfreeman451 commented 2025-05-02 16:08:03 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/708#discussion_r2071838932
Original created: 2025-05-02T16:08:03Z
Original path: pkg/core/server.go
Original line: 1030

not clear we need to be doing this, might come back and revisit it

Imported GitHub PR review comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/708#discussion_r2071838932 Original created: 2025-05-02T16:08:03Z Original path: pkg/core/server.go Original line: 1030 --- not clear we need to be doing this, might come back and revisit it
mfreeman451 commented 2025-05-02 16:18:07 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/708#discussion_r2071851044
Original created: 2025-05-02T16:18:07Z
Original path: pkg/db/db.go
Original line: 337

this looks dumb.. why are we inserting the same data into two different places?

Imported GitHub PR review comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/708#discussion_r2071851044 Original created: 2025-05-02T16:18:07Z Original path: pkg/db/db.go Original line: 337 --- this looks dumb.. why are we inserting the same data into two different places?
mfreeman451 commented 2025-05-02 18:45:20 +00:00 (Migrated from github.com)
Author
Owner

Imported GitHub PR review comment.

Original author: @mfreeman451
Original URL: https://github.com/carverauto/serviceradar/pull/708#discussion_r2072015019
Original created: 2025-05-02T18:45:20Z
Original path: pkg/db/db.go
Original line: 337

addressed, we are going to keep writing to the pollers table since it doesnt actually store a lot of data, and the performance hit from the pollers table is around .2 ms compared to 1-2ms to get it out of the pollers_history table, so 10-20x difference. we modified the updatepollers function so that it only updates the table when the status has changed as well

Imported GitHub PR review comment. Original author: @mfreeman451 Original URL: https://github.com/carverauto/serviceradar/pull/708#discussion_r2072015019 Original created: 2025-05-02T18:45:20Z Original path: pkg/db/db.go Original line: 337 --- addressed, we are going to keep writing to the `pollers` table since it doesnt actually store a lot of data, and the performance hit from the pollers table is around .2 ms compared to 1-2ms to get it out of the `pollers_history` table, so 10-20x difference. we modified the updatepollers function so that it only updates the table when the status has changed as well
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
carverauto/serviceradar!1582
No description provided.