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

Server-side DESCRIBE should include scylladb-specific options #12389

Closed
bhalevy opened this issue Dec 23, 2022 · 9 comments
Closed

Server-side DESCRIBE should include scylladb-specific options #12389

bhalevy opened this issue Dec 23, 2022 · 9 comments
Assignees
Milestone

Comments

@bhalevy
Copy link
Member

bhalevy commented Dec 23, 2022

As a follow-up to #12381 that included table's tombstone_gc_options in the log message printed when the table is created,
those options should also be included when printing the table's schema as part of server-side DESCRIBE (via CQL or when dumping schema.cql when taking a snapshot).

@bhalevy bhalevy changed the title Server-side DESCRIBE should include tombstone_gc_options Server-side DESCRIBE should include scylladb-specific options Dec 23, 2022
@bhalevy
Copy link
Member Author

bhalevy commented Dec 23, 2022

Looking at an example schema.cql, it doesn't include other scylladb-specific options like the cdc options.

bhalevy@lt tmp$ cat /tmp/scylla-2661692/data/system/local-7ad54392bcdd35a684174e047860b377/snapshots/test/schema.cql 
CREATE TABLE system.local (
    key text,
    bootstrapped text,
    broadcast_address inet,
    cluster_name text,
    cql_version text,
    data_center text,
    gossip_generation int,
    host_id uuid,
    listen_address inet,
    native_protocol_version text,
    partitioner text,
    rack text,
    release_version text,
    rpc_address inet,
    schema_version uuid,
    supported_features text,
    thrift_version text,
    tokens set<text>,
    truncated_at map<uuid, blob>,
    PRIMARY KEY (key)
) WITH bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL','rows_per_partition': 'ALL'}
    AND comment = 'information about the local node'
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1
    AND dclocal_read_repair_chance = 0
    AND default_time_to_live = 0
    AND gc_grace_seconds = 0
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0
    AND speculative_retry = '99.0PERCENTILE';

@bhalevy
Copy link
Member Author

bhalevy commented Dec 23, 2022

@Jadw1 I believe you're worked in this area not long ago (e6ffc22)
Can you please look into this?

@Jadw1
Copy link
Contributor

Jadw1 commented Dec 28, 2022

I can add this but it won't take affect (eg. in cqlsh) because of #12272. To increase the version, other changes need to be made to be compatible with Cassandra v4 (at least at driver level).

I wrote an email to our rnd-internal mailing list ("Increasing Scylla version to 4.x") but I don't know if any issues on that were scheduled.

@bhalevy
Copy link
Member Author

bhalevy commented Dec 28, 2022

Regardless of cqlsh support we use the server-side describe logic for generating the schema.cql file for snapshots.
And that one should be used for restore.

@Jadw1
Copy link
Contributor

Jadw1 commented Dec 28, 2022

Could you provide me a specification how exactly the table's schema should look like?

@bhalevy
Copy link
Member Author

bhalevy commented Dec 28, 2022

There is no formal specification .
It is a file containing CQL statements to restore the table's schema at the time when the snapshot was taken.
We also use for the scylla sstable tools for building a schema in memory used for interpreting the sstables, but for that, I guess the scylla schema extensions are less important (but I'm not 100% sure about that).

@bhalevy
Copy link
Member Author

bhalevy commented Dec 28, 2022

See

scylladb/replica/table.cc

Lines 1538 to 1541 in 1bfe234

future<> table::write_schema_as_cql(database& db, sstring dir) const {
std::ostringstream ss;
this->schema()->describe(db, ss, false);

@DoronArazii DoronArazii added this to the 5.x milestone Jan 24, 2023
Jadw1 added a commit to Jadw1/scylla that referenced this issue Jun 22, 2023
Add `speculative_retry`, `paxos_grace_seconds`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: scylladb#12389
Jadw1 added a commit to Jadw1/scylla that referenced this issue Jul 3, 2023
Add `speculative_retry`, `paxos_grace_seconds`, `tombstone_gc`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: scylladb#12389
Fixes: scylladb/scylla-enterprise#2979
Jadw1 added a commit to Jadw1/scylla that referenced this issue Jul 3, 2023
Add `paxos_grace_seconds`, `tombstone_gc`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: scylladb#12389
Fixes: scylladb/scylla-enterprise#2979
Jadw1 added a commit to Jadw1/scylla that referenced this issue Jul 3, 2023
Add `paxos_grace_seconds`, `tombstone_gc`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: scylladb#12389
Fixes: scylladb/scylla-enterprise#2979
@DoronArazii DoronArazii modified the milestones: 5.x, 5.4 Jul 26, 2023
@denesb
Copy link
Contributor

denesb commented Dec 18, 2023

Doesn't apply cleanly to 5.2, @Jadw1 please provide a backport PR.

@mykaul mykaul added the backport/5.2 Issues that should be backported to 5.2 branch once they'll be fixed label Jan 1, 2024
@mykaul
Copy link
Contributor

mykaul commented Jan 14, 2024

@Jadw1 - ping

Jadw1 added a commit to Jadw1/scylla that referenced this issue Jan 15, 2024
Add `paxos_grace_seconds`, `tombstone_gc`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: scylladb#12389
Fixes: scylladb/scylla-enterprise#2979
Jadw1 added a commit to Jadw1/scylla that referenced this issue Jan 15, 2024
Add `paxos_grace_seconds`, `tombstone_gc`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: scylladb#12389
Fixes: scylladb/scylla-enterprise#2979
denesb pushed a commit that referenced this issue Jan 16, 2024
Add `paxos_grace_seconds`, `tombstone_gc`, `cdc` and `synchronous_updates`
options to schema description.

Fixes: #12389
Fixes: scylladb/scylla-enterprise#2979

Closes #16786
@denesb denesb removed Backport candidate backport/5.2 Issues that should be backported to 5.2 branch once they'll be fixed labels Jan 16, 2024
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 a pull request may close this issue.

6 participants