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
Add support to timestamp resolution other than microsecond for TWCS #3152
Comments
@raphaelsc can you please clarify the issue with different clients ? if we have two clients writing data with different resolution how will the timestamp info be persisted into the file ? are other compaction strategies resilient to this - and if so how ? |
On Sun, Jan 28, 2018 at 9:20 AM, Shlomi Livne ***@***.***> wrote:
@raphaelsc <https://github.com/raphaelsc> can you please clarify the
issue with different clients ?
if we have two clients writing data with different resolution how will the
timestamp info be persisted into the file ?
AFAICT, user supplied timestamp will be persisted as is, so user is
responsible to keeping timestamp unit consistent for a given column family.
Perhaps we check that a timestamp has millisecond resolution and convert it
into micro before forwarding to sstable write? I don't think so. I need to
double check this.
are other compaction strategies resilient to this - and if so how ?
I don't think either TWCS or DTCS will be resilient to this. They have the
timestamp resolution option, defined in schema, and expects timestamp in
sstable metadata (min, max) to be exactly of the unit specified in schema.
from datastax doc: "When setting the timestamp_resolution for Date Tiered
Compaction Strategy (DTCS) settings, it is important to understand why
writes also need to set the same timestamp resolution. Failure to do so can
lead to a unmanageable number of sstables which can in turn lead to
compaction and repair problems."
so same requirement for C*.
What we need to do here is to allow an user willing to work with only
milliseconds to be able to do so, by extending TWCS to support it.
Currently, TWCS will only work with user supplied or server generated
timestamp which uses microsecond as resolution.
…
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3152 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWAc_tEtipvQ1JxyOBYAcOIY3kfYW07ks5tPFfygaJpZM4RseEr>
.
|
@raphaelsc well it seems strange that the user provided timestamp is not validated against the schema - I would expect some validation to be done. |
On Sun, Feb 4, 2018 at 10:08 AM, Shlomi Livne ***@***.***> wrote:
@raphaelsc <https://github.com/raphaelsc> well it seems strange that the
user provided timestamp is not validated against the schema - I would
expect some validation to be done.
It's probably a bad design issue. The timestamp resolution option exists
only for time series strategies, so it'd have to be done at strategy level.
So we'd need to postpone validation to strategy when extracting timestamp
from sstables.
We could try to add some resilience by converting ts on the fly, or throw
exception which would result in shutdown. Either way is better than current
because strategy will silently work with whatever timestamp it's provided
with which can lead to it misbehaving and consequently user will have bad
read performance.
… —
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3152 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWAc_ZwFkJYdIksZdNQjIzzbx5pda-Yks5tRZ2xgaJpZM4RseEr>
.
|
which client/versions? [1] https://github.com/kairosdb/kairosdb/blob/v1.2.0/ivy.xml#L61 |
we too are blocked on using TWCS with kairosDB -- if anyone can come up with a workaround or hackaround, even in kairosdb, in the mean time, that would help |
Is this about the If not, what is it? |
On Sun, Apr 8, 2018 at 8:58 AM, Avi Kivity ***@***.***> wrote:
Is this about the compaction_window_unit of TWCS? If so, I don't think it
affects timestamp resolution.
If not, what is it?
the timestamp resolution provided by client, which goes in
timestamp_resolution option which in turn goes in compaction strategy
options. That's somewhat awful. Older clients use millisecond instead of
microsecond.
… —
You are receiving this because you were assigned.
Reply to this email directly, view it on GitHub
<#3152 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ABWAcwUNLqW2o70K7k9SbAE2Zls8pF7yks5tmft5gaJpZM4RseEr>
.
|
Patch sent, waiting for review... |
Wow, that's truly terrible. Oh well. |
It will be nice to push to 2.2
…On Thu, Apr 12, 2018 at 3:35 AM, scylladb-promoter ***@***.*** > wrote:
Closed #3152 <#3152> via 0c72781
<0c72781>
.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#3152 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/ABp6RejQTnMSFBPiykh4VIMEdRPMtRq6ks5tny3cgaJpZM4RseEr>
.
|
Not yet part of 2.2 |
That's blocking KairosDB users because it uses TWCS with millisecond timestamp resolution. Also older drivers use millisecond instead of the default microsecond. Fixes scylladb#3152. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Message-Id: <20180411171244.19958-1-raphaelsc@scylladb.com> (cherry picked from commit 0c72781) Signed-off-by: Glauber Costa <glauber@scylladb.com>
That's blocking KairosDB users because it uses TWCS with millisecond timestamp resolution. Also older drivers use millisecond instead of the default microsecond. Fixes scylladb#3152. Signed-off-by: Raphael S. Carvalho <raphaelsc@scylladb.com> Message-Id: <20180411171244.19958-1-raphaelsc@scylladb.com> (cherry picked from commit 0c72781) Signed-off-by: Glauber Costa <glauber@scylladb.com>
Certain/older clients may decide to work with milliseconds as timestamp resolution instead
The text was updated successfully, but these errors were encountered: