Use ClickHouseAutoIncrement rather than dao.getLargestId() - #168
Open
sheridancbio wants to merge 3 commits into
Open
Use ClickHouseAutoIncrement rather than dao.getLargestId()#168sheridancbio wants to merge 3 commits into
sheridancbio wants to merge 3 commits into
Conversation
cbioportalpipelines
force-pushed
the
fix-delete-race-condition
branch
2 times, most recently
from
August 7, 2026 16:33
9fa9cf6 to
c261e58
Compare
- process per phase (create/populate/delete/drop) rather than per table
- use separate staging table for every table/idColumn pair
- wait for earlier phase to show completion before proceeding
- adjust java type of internal identifiers to Long (for clinical_event_ids)
- use system.parts table as an accurate records count
- for confirming population of staging table
- for confirming the consistency across cluster replicas (clickhouse.cloud)
cbioportalpipelines
force-pushed
the
eliminate-clinical-event-id-pregen
branch
from
August 12, 2026 22:45
11b281d to
896f3d7
Compare
jamesqo
reviewed
Aug 17, 2026
| private static final String DELETE_MUTATION = "DELETE from mutation WHERE genetic_profile_id=? and sample_id=?"; | ||
|
|
||
| public static int addMutation(ExtendedMutation mutation, boolean newMutationEvent) throws DaoException { | ||
| public static void addMutation(ExtendedMutation mutation) throws DaoException { |
Contributor
There was a problem hiding this comment.
I don't see ClickHouseAutoIncrement called in this method? And don't think that insertRecord increments the database ID, either.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several import classes were using their own business logic to increment internal ids based on the highest available integer value in the current database table.
This PR converts that business logic over to using the ClickHouseAutoIncrement class, and will also relocate the assignment of internal identifiers into the dao layer rather than the scripts layer.