-
Notifications
You must be signed in to change notification settings - Fork 11
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
Changed executeUpdate to executeLargeUpdate #1595
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add Ugur and @SanjayVas to this?
Reviewed all commit messages.
Reviewable status: 0 of 1 files reviewed, 1 unresolved discussion (waiting on @RibeiroAna)
src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/deploy/common/postgres/PostgresBackingStore.kt
line 180 at r1 (raw file):
statement.setString(2, privacyReference.referenceId) statement.setObject(3, privacyReference.isRefund) // TODO(@duliomatos) Make the blocking IO run within a dispatcher using coroutines
this TODO still is need, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 1 unresolved discussion (waiting on @stevenwarejones)
src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/deploy/common/postgres/PostgresBackingStore.kt
line 180 at r1 (raw file):
Previously, stevenwarejones (Steven Ware Jones) wrote…
this TODO still is need, right?
Done.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: complete! all files reviewed, all discussions resolved (waiting on @SanjayVas and @uakyol)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reviewed 1 of 1 files at r2, all commit messages.
Reviewable status: all files reviewed, 2 unresolved discussions (waiting on @RibeiroAna and @uakyol)
src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/deploy/common/postgres/PostgresBackingStore.kt
line 180 at r2 (raw file):
statement.setString(2, privacyReference.referenceId) statement.setObject(3, privacyReference.isRefund) // TODO: Make the blocking IO run within a dispatcher using coroutines
nit: this TODO is obsolete. Instead of ensuring blocking calls use the appropriate coroutine dispatcher, we should instead be using the asynchronous R2DBC-based Postgres client (org.wfanet.measurement.common.db.r2dbc.postgres.PostgresDatabaseClient
). This can have my username as the reference.
src/main/kotlin/org/wfanet/measurement/eventdataprovider/privacybudgetmanagement/deploy/common/postgres/PostgresBackingStore.kt
line 181 at r2 (raw file):
statement.setObject(3, privacyReference.isRefund) // TODO: Make the blocking IO run within a dispatcher using coroutines statement.executeLargeUpdate()
Can you share more info on the performance difference, e.g. referencing some documentation in a comment that indicates why this would be more performant? The docs for this interface only mention using executeLargeUpdate
instead of executeUpdate
when there could be more than Int.MAX_VALUE results (the signature difference is that this returns a Long
instead of an Int
).
At Meta, @stevenwarejones realized that changing executeUpdate to executeLargeUpdate for the ACDPCharges would hugely improve the performance of the PBM.
@uakyol and @SanjayVas if you could take a look (for some reason I cannot officially assign you)