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

CON-305 fixInconsistentUser() fixes + logging + tests #3631

Merged
merged 2 commits into from
Aug 4, 2022

Conversation

SidSethi
Copy link
Contributor

@SidSethi SidSethi commented Aug 4, 2022

Description

followup to this comment

  • add missing await inside function
  • add log every time function is called
  • try-catch to prevent unexpected errors
  • test coverage

Note: I wanted to only call this inside secondarySyncFromPrimary on specific error, but this isn't easily possible, and likely not worth for now since DB transaction failures should most likely only occur from this error

Tests

New unit test coverage for function

Monitoring - How will this change be monitored? Are there sufficient logs / alerts?

Errors containing fixInconsistentUser, and reduced sync failure rates due to failure_db_transaction

@SidSethi SidSethi changed the title fixInconsistentUser() bugfix + logging + tests CON-305 fixInconsistentUser() bugfix + logging + tests Aug 4, 2022
@SidSethi SidSethi changed the title CON-305 fixInconsistentUser() bugfix + logging + tests CON-305 fixInconsistentUser() fixes + logging + tests Aug 4, 2022
@SidSethi SidSethi force-pushed the ss-fixIncnsistentUser-improvements branch from 056c096 to 3e135fd Compare August 4, 2022 21:04
@SidSethi SidSethi marked this pull request as ready for review August 4, 2022 21:06
Copy link
Contributor

@dmanjunath dmanjunath left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one question about the test but code itself looks good

creator-node/test/dbManager.test.js Show resolved Hide resolved
@SidSethi SidSethi merged commit 18954c5 into master Aug 4, 2022
@SidSethi SidSethi deleted the ss-fixIncnsistentUser-improvements branch August 4, 2022 22:15
audius-infra pushed a commit that referenced this pull request Aug 4, 2022
## Changelog

- 2022-08-04 [d141187] INF-210 include change log in commit and tag (#3642) [Joaquin Casares]
- 2022-08-04 [37ad770] Clear running migrations on server start (#3640) [Dheeraj Manjunath]
- 2022-08-04 [2528cab] Bump sdk to v0.0.30 [audius-infra]
- 2022-08-04 [18954c5] CON-305 fixInconsistentUser() fixes + logging + tests (#3631) [Sid Sethi]
audius-infra pushed a commit that referenced this pull request Aug 4, 2022
## Changelog

- 2022-08-04 [d141187] INF-210 include change log in commit and tag (#3642) [Joaquin Casares]
- 2022-08-04 [37ad770] Clear running migrations on server start (#3640) [Dheeraj Manjunath]
- 2022-08-04 [2528cab] Bump sdk to v0.0.30 [audius-infra]
- 2022-08-04 [18954c5] CON-305 fixInconsistentUser() fixes + logging + tests (#3631) [Sid Sethi]
@@ -313,25 +313,28 @@ class DBManager {
* Given a user's UUID, this function will set their clock value equal to the max clock value
* found in the ClockRecords table for that same user
*
* @param userUUID the UUID for the user whose clock needs to be made consistent
* @param cnodeUserUUID the UUID for the user whose clock needs to be made consistent
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should there be a @returns here to show that it's returning the rowsChanged

const fixed = await DBManager.fixInconsistentUser(
fetchedCNodeUser.cnodeUserUUID
)
logger.warn(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔥🔥🔥

sliptype pushed a commit that referenced this pull request Sep 10, 2023
[fe5fda4] Fix entity button widths (#3650) Dylan Jeffers
[820e79e] Fix user profile always showing artist tabs (#3648) Dylan Jeffers
[bc34b6f] [C-2697] Fix mobile playlist qa issues (#3638) Dylan Jeffers
[3e8d7e8] Mobile chats recalculate container bottom on keyboard shown (#3644) Reed
[39928cf] Bump app versions for full release (#3643) Reed
[437e971] Update SDK to v3.0.3-beta.56 (#3641) Marcus Pasell
[3e42cb2] [PAY-1526] Mobile chat reaction picker shadow (#3642) Reed
[ab33206] Amplitude tracking for chat report abuse (#3639) Reed
[6f570c6] Put playlist-artwork generation behind flag (#3640) Dylan Jeffers
[2f1f40d] [C-2475] Add desktop favorites playlist tab (#3637) Dylan Jeffers
[394cacb] [PAY-1516] Chat report abuse flow (#3636) Reed
[82204ec] [C-2763] Fix desktop playlist qa issues (#3634) Dylan Jeffers
[3912407] Implement OAuth Write Popup C-2664 (#3628) nicoback2
[7e13b54] [C-2783] Add terms of service link (#3635) Dylan Jeffers
[bda6eeb] Refactor: extract reusable modal field component (#3631) Andrew Mendelsohn
[c2a59dc] [PAY-1319] Fix emoji keyboard overlapping chat text input (#3629) Reed
[14150ec] [C-2784] Refactor track page to use entity button (#3624) Dylan Jeffers
[5a3e74e] [PAY-1457] Add amplitude analytics to chat features (#3627) Marcus Pasell
[d1aee10] [PAY-1412] Reset player state on app load (#3632) Reed
[965330c] [PAY-1191] Finesse keyboard enter/exit animations (#3633) Michael Piazza
[c9c531e] Create grant upon making developer app (#3630) nicoback2
[a33de30] [PAY-1464] DMs: Go to chat after successful tip (#3625) Marcus Pasell
[646a5eb] [PLAT-1015] Remove entity manager feature flag (#3619) Raymond Jacobson
[31450e7] [PAY-1498][PAY-1477] Misc mobile DMs UI Fixes (#3626) Michael Piazza
[a08f3e7] [C-2760, C-2779] Fix header for playlist and artists tabs in explore screen (#3579) Kyle Shanks
[9a98157] [C-2676] Rough release date modal (#3610) Andrew Mendelsohn
[5e9a847] [C-2771, C-2772] Add duplicate add to playlist confirmation drawer and modal (#3601) Kyle Shanks
[49ca553] [PAY-1468] Fix mobile chats copy message button (#3623) Reed
[193ae1c] [PAY-1483] Patch RN to fix textinput multiline onchange not firing (#3622) Reed
@AudiusProject AudiusProject deleted a comment from linear bot Sep 11, 2023
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.

3 participants