Skip to content
This repository was archived by the owner on Aug 23, 2023. It is now read-only.

Provide a tool to copy data between Cassandra clusters #909

Closed
wants to merge 8 commits into from

Conversation

shanson7
Copy link
Collaborator

This is similar to mt-update-ttl but allows the destination cluster to differ from the source.

Additionally, it uses unlogged batches for performance.

@Dieterbe Dieterbe added this to the 0.10.0 milestone May 16, 2018
maxBatchSize = flag.Int("max-batch-size", 10, "max number of queries per batch")

idxTable = flag.String("idx-table", "metric_idx", "idx table in cassandra")
partitions = flag.String("partitions", "*", "process ids for these partitions (comma separated list of partition numbers or '*' for all)")
Copy link
Contributor

Choose a reason for hiding this comment

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

might want to add validation that this should not be an empty string, or simply that it is a series of digits (can be parsed with strconv.Atoi)

Copy link
Contributor

Choose a reason for hiding this comment

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

never mind i see now that you do this.

}

func update(sourceSession, destSession *gocql.Session, tableIn, tableOut string) {
// Get the list of ids that we carry about
Copy link
Contributor

Choose a reason for hiding this comment

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

care about?

@Dieterbe
Copy link
Contributor

do you remember offhand what kind of improvement you got thanks to the unlogged batches?

this tool looks fit for merging.was it reliable in your experience?

@shanson7
Copy link
Collaborator Author

Offhand, I don't know. While running it in k8s it was unfortunately unreliable. After some time, writes would stop being reflected (although gocql indicated they were succeeding). Not sure if that was our Cassandra setup or not though. Either way, it takes days to copy even a small time range :/

@shanson7
Copy link
Collaborator Author

Without unlogged batches, it was far slower, but exhibited the same behavior of writes just stopping. Very strange.

@Dieterbe
Copy link
Contributor

then I think i shall merge it but mark it as experimental.

@Dieterbe
Copy link
Contributor

Dieterbe commented Sep 6, 2018

merging via #1033
thanks @shanson7 !

@Dieterbe Dieterbe closed this Sep 6, 2018
@shanson7 shanson7 deleted the feature_mt-store-cp branch October 2, 2018 17:00
@Dieterbe Dieterbe modified the milestones: 1.0, 0.10.0 Dec 12, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants