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

simplify creating repair run and segments #101

Conversation

michaelsembwever
Copy link
Member

Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.

Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.

This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:

@michaelsembwever michaelsembwever force-pushed the mck/simplify-creating-repair-run-and-segments branch from 4084359 to 2a778bd Compare May 13, 2017 04:59
michaelsembwever added a commit that referenced this pull request May 13, 2017
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101
@tlpsonarqube
Copy link
Collaborator

SonarQube analysis reported 1 issue

  • MINOR 1 minor

Watch the comments in this conversation to review them.

@adejanovski
Copy link
Contributor

@michaelsembwever : although I fail to understand why, the 001_Initialize_db.cql file is different in this branch but the change doesn't appear in the files changes in the PR...

The problem is the same here than in another PR : the CQL files that exist in master shouldn't be modified and only new incremental changes should be performed in subsequent files so that we don't break the schema migration logic.
Maybe we could merge this PR with the one that merges the repair_run and repair_segment tables ? This way we would have a single table change instead of 2.

What do you think ?

Copy link
Contributor

@adejanovski adejanovski left a comment

Choose a reason for hiding this comment

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

Schema changes need to be added in new CQL files with a higher version. This will ensure that we don't break the schema migration pattern.

@michaelsembwever
Copy link
Member Author

The problem is the same here than in another PR : the CQL files that exist in master shouldn't be modified and only new incremental changes should be performed in subsequent files so that we don't break the schema migration logic.
Maybe we could merge this PR with the one that merges the repair_run and repair_segment tables ? This way we would have a single table change instead of 2.

Let's do that. I'll take the migration to a new table approach as well, as you suggest in the other PR.

@michaelsembwever michaelsembwever force-pushed the mck/replace-sequence-ids-with-time-uuids branch from 58c70c7 to f5291d9 Compare May 28, 2017 05:23
@michaelsembwever michaelsembwever force-pushed the mck/simplify-creating-repair-run-and-segments branch from 2a778bd to 25a3f9f Compare May 28, 2017 05:24
michaelsembwever added a commit that referenced this pull request May 28, 2017
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101
michaelsembwever added a commit that referenced this pull request May 28, 2017
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101
@michaelsembwever michaelsembwever force-pushed the mck/simplify-creating-repair-run-and-segments branch from 79eae1c to 25a3f9f Compare May 29, 2017 09:04
@adejanovski adejanovski force-pushed the mck/replace-sequence-ids-with-time-uuids branch from f5291d9 to 4b430cb Compare May 29, 2017 13:22
@adejanovski adejanovski changed the base branch from mck/replace-sequence-ids-with-time-uuids to mck/cassandra-improvements-94 May 29, 2017 13:55
michaelsembwever and others added 4 commits May 29, 2017 16:29
 Makes the schema changes in a separate migration step, so that data in the repair_unit and repair_schedule tables can be migrated over.

ref: #99 (comment)
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101
@adejanovski adejanovski force-pushed the mck/simplify-creating-repair-run-and-segments branch from 25a3f9f to 33be3fa Compare May 29, 2017 14:51
RepairRun repairRun = storeNewRepairRun(context, cluster, repairUnit, cause, owner, nodes.keySet().size(),
repairParallelism, intensity);
checkNotNull(repairRun, "failed preparing repair run");
segments = repairUnit.getIncrementalRepair() ? nodes.keySet().size() : tokenSegments.size();
Copy link
Collaborator

Choose a reason for hiding this comment

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

MINOR Introduce a new variable instead of reusing the parameter "segments". rule

@adejanovski adejanovski merged commit e303141 into mck/cassandra-improvements-94 May 29, 2017
michaelsembwever added a commit that referenced this pull request May 31, 2017
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101
@michaelsembwever michaelsembwever deleted the mck/simplify-creating-repair-run-and-segments branch June 1, 2017 12:00
adejanovski added a commit that referenced this pull request Jun 1, 2017
* Cassandra performance: Replace sequence ids with time-based UUIDs
  Makes the schema changes in a separate migration step, so that data in the repair_unit and repair_schedule tables can be migrated over.

ref:
 - #99
 - #94
 - #99 (comment)

* Simplify the creation of repair runs and their segments.
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101

* In CassandraStorage implement segments as clustering keys within the repair_run table.
Change required in IStorage so to identify a segment both by runId and segmentId.

ref:
 - #94
 - #102

* Fix number of parallel repair computation
Downgrade to Dropwizard 1.0.7 and Guava 19.0 to fix dependency issues
Make repair manager schedule cycle configurable (was 30s hardcoded)

ref: #108

* In CassandraStorage replace the table scan on `repair_run` with a async break-down of per cluster run-throughs of known run IDs.

 ref: #105
adejanovski pushed a commit that referenced this pull request Jun 26, 2017
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101
michaelsembwever pushed a commit that referenced this pull request Jun 27, 2017
* Cassandra performance: Replace sequence ids with time-based UUIDs
  Makes the schema changes in a separate migration step, so that data in the repair_unit and repair_schedule tables can be migrated over.

ref:
 - #99
 - #94
 - #99 (comment)

* Simplify the creation of repair runs and their segments.
 Repair runs and their segments are one unit of work in concept and the persistence layer should be designed accordingly.
 Previous they were separated because the concern of sequence generation for IDs were exposed in the code. This is now encapsulated within storage implementations.
 This work allows the CassandraStorage to implement segments as clustering keys within the repair_run table.

ref:
 - #94
 - #101

* In CassandraStorage implement segments as clustering keys within the repair_run table.
Change required in IStorage so to identify a segment both by runId and segmentId.

ref:
 - #94
 - #102

* Fix number of parallel repair computation
Downgrade to Dropwizard 1.0.7 and Guava 19.0 to fix dependency issues
Make repair manager schedule cycle configurable (was 30s hardcoded)

ref: #108

* In CassandraStorage replace the table scan on `repair_run` with a async break-down of per cluster run-throughs of known run IDs.

 ref: #105
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants