-
Notifications
You must be signed in to change notification settings - Fork 37
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
Do not do truncate table
operation by default
#149
Do not do truncate table
operation by default
#149
Conversation
@vponomaryov , if you want to run them in validation mode it can work only by chance. If in regular mode, table won't be truncated. To make it work in parallel on the same table we need somehow split targeted primary key values between runners. |
Different concurrent commands use index offsets. |
|
ca8a3fe
to
4070454
Compare
truncate table
operation if not requested explicitly
Changed the logic to consider the workload type. |
What I meant is that if your purpose to run couple of From first look it should be pretty easy, there is alreayd concept of |
4070454
to
1607a7b
Compare
truncate table
operation by default
@dkropachev 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.
LGTM
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.
You also forgot about RangeScan
,
It should go into RangeOffset
and RangeCount
I also would prefere different CLI, something like:
--worker-id N
where partitionOffset := (workerID - 1) * partitiionCount
and truncateTable := workerID != 0
pkg/workloads/workloads.go
Outdated
period := time.Duration(int64(time.Second.Nanoseconds()) * (pkCount / int64(threadCount)) / rate) | ||
pkStride := int64(threadCount) | ||
pkOffset := int64(threadId) | ||
pkOffset := int64(threadId) + basicPkOffset |
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.
pkOffset := int64(threadId) + basicPkOffset | |
pkOffset := int64(threadId) + basicPkOffset | |
pkCount += basicPkOffset |
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.
Why do you propose to summarize the partition "offset" with the partition "count"?
Both serve different goals.
how worker ID is related to the question ?, user should be able to say, should the stress tool truncate or not, same as in c-s. I fail to see how this is related to the title of this PR. |
I didn't forgot about "scan". It is explicitly mentioned to not support partition offsets. The main use case here is ability to disable truncation of a table with clear purpose - running multiple scylla-bench commands against single DB table for having cumulative "population" effect and not cumulative "breaking" one.
I have 2 concerns with this proposal:
|
|
If it is needed to truncate a DB table, then just use following new parameter: -truncate-table With this change it will be possible to use multiple scylla-bench concurrent commands which won't truncate each other's data. Closes: scylladb#30 Closes: scylladb#130
1607a7b
to
7aff1aa
Compare
Splitted the second commit to another PR here: |
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.
@vponomaryov , my assumption was that data validation won't work if s-b
instances are writing to the same table, which is not the case, which changes a lot and now I am ok with your cli
seems like we can merge. |
v0.1.23
scylladb/scylla-cluster-tests#9096
If it is needed to truncate a DB table, then just use
following new parameter:
With this change it will be possible to use multiple scylla-bench
concurrent commands which won't truncate each other's data.
Closes: #30
Closes: #130