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

CQLSH tracing broken since 5.1 #336

Open
horschi opened this issue Jul 25, 2023 · 13 comments
Open

CQLSH tracing broken since 5.1 #336

horschi opened this issue Jul 25, 2023 · 13 comments

Comments

@horschi
Copy link

horschi commented Jul 25, 2023

Hi,

since the 5.1 upgrade it seems CQLSH is not able to print traces any more.

Instead of the trace I get the following error:

Tracing session: c43e0b70-2b07-11ee-8f22-554cb1da280a

Unable to fetch query trace: print_formatted_result() takes exactly 5 arguments (3 given)

I tried tracing in various environments. 5.0 installations are still working, 5.1 gives this error. (Tried with 5.1.14 and 5.1.11)

All installations are Ubuntu based, installed using the Ubuntu repo.

Christian

@avikivity
Copy link
Member

Works for me (5.1.4):

cqlsh> tracing on
Now Tracing is enabled
cqlsh> select * from system.local;

 key   | bootstrapped | broadcast_address | cluster_name | cql_version | data_center | gossip_generation | host_id                              | listen_address | native_protocol_version | partitioner                                 | rack  | release_version | rpc_address | schema_version                       | supported_features                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | thrift_version | tokens                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     | truncated_at
-------+--------------+-------------------+--------------+-------------+-------------+-------------------+--------------------------------------+----------------+-------------------------+---------------------------------------------+-------+-----------------+-------------+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------
 local |    COMPLETED |        10.0.2.100 |              |       3.3.1 | datacenter1 |        1690304472 | da336f59-11ea-43cb-beb0-6a799853887e |     10.0.2.100 |                       4 | org.apache.cassandra.dht.Murmur3Partitioner | rack1 |           3.0.8 |  10.0.2.100 | f19ecfd7-c58a-3e34-8dbb-9dc2b7da98be | AGGREGATE_STORAGE_OPTIONS,CDC,CDC_GENERATIONS_V2,COMPUTED_COLUMNS,CORRECT_COUNTER_ORDER,CORRECT_IDX_TOKEN_IN_SECONDARY_INDEX,CORRECT_NON_COMPOUND_RANGE_TOMBSTONES,CORRECT_STATIC_COMPACT_IN_MC,COUNTERS,DIGEST_FOR_NULL_VALUES,DIGEST_INSENSITIVE_TO_EXPIRY,DIGEST_MULTIPARTITION_READ,HINTED_HANDOFF_SEPARATE_CONNECTION,INDEXES,LARGE_PARTITIONS,LA_SSTABLE_FORMAT,LWT,MATERIALIZED_VIEWS,MC_SSTABLE_FORMAT,MD_SSTABLE_FORMAT,ME_SSTABLE_FORMAT,NONFROZEN_UDTS,PARALLELIZED_AGGREGATION,PER_TABLE_CACHING,PER_TABLE_PARTITIONERS,RANGE_SCAN_DATA_VARIANT,RANGE_TOMBSTONES,ROLES,ROW_LEVEL_REPAIR,SCHEMA_COMMITLOG,SCHEMA_TABLES_V3,SEPARATE_PAGE_SIZE_AND_SAFETY_LIMIT,STREAM_WITH_RPC_STREAM,TOMBSTONE_GC_OPTIONS,TRUNCATION_TABLE,TYPED_ERRORS_IN_READ_RPC,UDA,UDA_NATIVE_PARALLELIZED_AGGREGATION,UNBOUNDED_RANGE_TOMBSTONES,VIEW_VIRTUAL_COLUMNS,WRITE_FAILURE_REPLY,XXHASH |         20.1.0 | {'-1068222023524172866', '-1105326607220890625', '-1137778117933289915', '-1141832716901330920', '-1153823141798865533', '-1249318065246191294', '-1334861742178750311', '-1337006006348702088', '-1438274529861780788', '-1522617487751006215', '-152331003302355176', '-1582285549468707834', '-1626854651465466585', '-1636458984314520738', '-1659466994929309210', '-1747432798967966833', '-1824017529215161752', '-1884808441609804793', '-1894480184498078616', '-2100216496094299874', '-2128476725877326068', '-2245421480855652631', '-2375002966025380940', '-2388559206518297285', '-2412294090201464897', '-2443191291625909629', '-2591944799693516705', '-2612493572246895084', '-2648177260121300910', '-2782805160900837333', '-282395326031468258', '-2839551372157027246', '-2921806497893204830', '-2964044082270512016', '-2966878840851152307', '-299229405988523278', '-3100446505624489041', '-3155779002299881853', '-3338260954914332391', '-335772345301732523', '-3496735203240548938', '-3650765117773995875', '-3794917938983351770', '-3809054880778796551', '-3822209008254373199', '-3874372337578550948', '-3940615568938658151', '-4059432098196939874', '-4107829669511522377', '-4123009819782108622', '-4145607945575401184', '-4170702349517917183', '-4374611226276036372', '-4408704629934898984', '-4441833887495297780', '-4481478932015575804', '-4489740845151372003', '-4523802141530945006', '-453483021349175125', '-464556482880732397', '-4837346817752698246', '-487035821833950911', '-4887688766042550933', '-4899480862830732831', '-5177037795178908174', '-5238850582779158965', '-5271693402434135715', '-5347391060374158600', '-5390702244653001300', '-5420377885542182465', '-5579025422122469747', '-5621168335964098', '-5640955899190063103', '-5753407144762730003', '-5780032654250822701', '-584947187953659381', '-6041299590914247357', '-604324690137399353', '-6090633923401483408', '-6107443377970860683', '-6150023999775545989', '-6183954201989965607', '-6289344524055260588', '-6299249779700309078', '-6457640073643816043', '-6607987746460301710', '-6618475822990825747', '-663235601177851791', '-6710741715364308617', '-6742535919138020055', '-6848760600964367732', '-6896393496760113742', '-6896547036600018689', '-6906303315843624857', '-6945347831189675090', '-7093553026556602682', '-7109016629706981303', '-715014029700803832', '-7205475024937595026', '-7340469038036893860', '-743421715454951624', '-7501444669120927431', '-7580621812522641591', '-7587551671929866467', '-7678093832262139444', '-7685852379881720643', '-7760321044787428934', '-7873426509193149078', '-8017534866405608802', '-8092294607817717619', '-8099174149141828252', '-8130600335762892274', '-8138739993845399636', '-8156734348969773703', '-8289481945597572456', '-8391057862325510382', '-8460656636158647159', '-8532019405518987126', '-8581042277425522775', '-8591954727963082307', '-8719092387682168510', '-8883661824266991552', '-8918386971019149504', '-8990324325600727763', '-899790726136965569', '-9009519526470995759', '-906224469989504773', '-9070832380260772250', '-9221673840741435731', '-990051980524966622', '-998010677334284680', '1076845511311526378', '1083746914190248551', '1085143691434972841', '1147298436269890699', '1149158010599772366', '1347256298744319338', '1545640502951711889', '1569417675213799977', '1691753197499606816', '171485672249325341', '1755747727447715140', '1821026428306794246', '191217346650292238', '1942998567745931243', '1944708422639213850', '2116054483736437953', '2189310276893715515', '2222251806407014410', '2249042686315007632', '228680786262741721', '2424655459295033262', '2448851501520495806', '2661904660695607964', '269665222520622163', '2783795620322603849', '2863970863952410596', '2901894590221971093', '2928577453004678868', '2944129088641127318', '3223889730119293931', '3239296662880218335', '3283156874977408174', '3373299037580270853', '3467375725958345948', '3487628942319362037', '3551191697973873828', '3657236266789711136', '368511502962611407', '3870130300476240094', '3939445780344601211', '3995802870961175271', '4114684012065586405', '4125252443768077602', '4201106493428590212', '4231819641179193320', '4371704689640523906', '4515713596107005200', '4598692878323472073', '461024271988187963', '4615459936938906223', '4641439291458163498', '4735474595355008830', '4778070913240505113', '4802573096688062784', '492536790274963038', '4926797298377390799', '5023662872578929652', '508652793325494406', '5139417027536040355', '5144480979634547667', '5146162416654335725', '5195350504360739282', '5200090312740853968', '524760167719222426', '5308012284435333749', '5398762466694004283', '5474530423061356123', '5480692445829077690', '5485692159746534413', '55072739315716481', '5533407590427190572', '5573100580042565468', '5596805035791814523', '5643292128425777447', '5861260800173067845', '5891044118882479689', '6000587988146688103', '6108211287625648291', '6238846465367729610', '634960027504357809', '6511905307691779041', '6634960006404324662', '666976592064974679', '6847107712815870753', '6928617340212240328', '6940011105731380262', '6985778710551038719', '7018205784855783322', '7145758382464914538', '7527289469852053629', '7565273835091922293', '7668010911757365902', '7728197717242026454', '7750715247343317926', '788903724189617702', '7918155625743947468', '796132380367388445', '7969409984698833942', '8119514745149062161', '8154421179594461467', '8220532545836735852', '8329403122168867476', '8332963856162697553', '839087386663581118', '8480004610211410472', '8524809116912859789', '8527146183673481906', '8563986865334514595', '86285805844307524', '8649779467634616266', '8660255363542570887', '8674300652166182081', '8732439407943703421', '8764829721335693570', '8782068937990742917', '8941785549689111242', '9072309396712691329', '9084797354515193788', '9091107421669144269', '9121403337999218560', '9137466156053530930', '9206417772035120733', '937375265447729072', '96148223150319570', '982840534416078312'} |         null

(1 rows)

Tracing session: f6788700-2b0c-11ee-96dc-324cd51343b3

 activity                                                                                                                              | timestamp                  | source     | source_elapsed | client
---------------------------------------------------------------------------------------------------------------------------------------+----------------------------+------------+----------------+------------
                                                                                                                    Execute CQL3 query | 2023-07-25 17:01:56.976000 | 10.0.2.100 |              0 | 10.0.2.100
                                                                                                         Parsing a statement [shard 1] | 2023-07-25 17:01:56.976590 | 10.0.2.100 |             -- | 10.0.2.100
                                                                                                      Processing a statement [shard 1] | 2023-07-25 17:01:56.976636 | 10.0.2.100 |             46 | 10.0.2.100
                                                                                                 read_data: querying locally [shard 1] | 2023-07-25 17:01:56.976662 | 10.0.2.100 |             72 | 10.0.2.100
                                                                                     Start querying token range (-inf, +inf) [shard 1] | 2023-07-25 17:01:56.976665 | 10.0.2.100 |             75 | 10.0.2.100
                                                                                           Creating shard reader on shard: 0 [shard 0] | 2023-07-25 17:01:56.976757 | 10.0.2.100 |              2 | 10.0.2.100
                                                              Scanning cache for range (-inf, +inf) and slice {(-inf, +inf)} [shard 0] | 2023-07-25 17:01:56.976896 | 10.0.2.100 |            142 | 10.0.2.100
                                                                                           Creating shard reader on shard: 1 [shard 1] | 2023-07-25 17:01:56.977208 | 10.0.2.100 |            618 | 10.0.2.100
                                                              Scanning cache for range (-inf, +inf) and slice {(-inf, +inf)} [shard 1] | 2023-07-25 17:01:56.977217 | 10.0.2.100 |            627 | 10.0.2.100
 Page stats: 1 partition(s), 0 static row(s) (0 live, 0 dead), 1 clustering row(s) (1 live, 0 dead) and 0 range tombstone(s) [shard 1] | 2023-07-25 17:01:56.977340 | 10.0.2.100 |            750 | 10.0.2.100
                                                                                                            Querying is done [shard 1] | 2023-07-25 17:01:56.977459 | 10.0.2.100 |            869 | 10.0.2.100
                                                                                        Done processing - preparing a result [shard 1] | 2023-07-25 17:01:56.977477 | 10.0.2.100 |            888 | 10.0.2.100
                                                                                                                      Request complete | 2023-07-25 17:01:56.976906 | 10.0.2.100 |            906 | 10.0.2.100


cqlsh>

Please post the query that failed, maybe it depends on something.

@horschi
Copy link
Author

horschi commented Jul 25, 2023

I run cqlsh with a hostname, I dont know if that could be a reason:

cs@cs-TUXEDO-Polaris-AMD-Gen3-CZN:~$ ping curhost 
PING curhost (127.1.1.1) 56(84) bytes of data.
64 bytes from curhost (127.1.1.1): icmp_seq=1 ttl=64 time=0.025 ms
^C
--- curhost ping statistics ---
1 packets transmitted, 1 received, 0% packet loss, time 0ms
rtt min/avg/max/mdev = 0.025/0.025/0.025/0.000 ms
cs@cs-TUXEDO-Polaris-AMD-Gen3-CZN:~$ cqlsh curhost
Connected to pclocal at curhost:9042.
[cqlsh 5.0.1 | Cassandra 3.0.8 | CQL spec 3.3.1 | Native protocol v4]
Use HELP for help.
cqlsh> 

I just tried with your example:

cqlsh:system> SELECT  * from system.local ;

 key   | bootstrapped | broadcast_address | cluster_name | cql_version | data_center | gossip_generation | host_id                              | listen_address | native_protocol_version | partitioner                                 | rack | release_version | rpc_address | schema_version                       | supported_features                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 | thrift_version | tokens                   | truncated_at
-------+--------------+-------------------+--------------+-------------+-------------+-------------------+--------------------------------------+----------------+-------------------------+---------------------------------------------+------+-----------------+-------------+--------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+----------------+--------------------------+--------------
 local |    COMPLETED |           0.0.0.0 |      pclocal |       3.3.1 |         OSP |        1690281232 | 62a105e9-bae7-4026-849f-2e4cadd5c6ee |        0.0.0.0 |                       4 | org.apache.cassandra.dht.Murmur3Partitioner |    A |           3.0.8 |   127.1.1.1 | a9820f03-0501-321d-b6f0-6e4869c7bcc4 | AGGREGATE_STORAGE_OPTIONS,CDC,CDC_GENERATIONS_V2,COMPUTED_COLUMNS,CORRECT_COUNTER_ORDER,CORRECT_IDX_TOKEN_IN_SECONDARY_INDEX,CORRECT_NON_COMPOUND_RANGE_TOMBSTONES,CORRECT_STATIC_COMPACT_IN_MC,COUNTERS,DIGEST_FOR_NULL_VALUES,DIGEST_INSENSITIVE_TO_EXPIRY,DIGEST_MULTIPARTITION_READ,HINTED_HANDOFF_SEPARATE_CONNECTION,INDEXES,LARGE_PARTITIONS,LA_SSTABLE_FORMAT,LWT,MATERIALIZED_VIEWS,MC_SSTABLE_FORMAT,MD_SSTABLE_FORMAT,ME_SSTABLE_FORMAT,NONFROZEN_UDTS,PARALLELIZED_AGGREGATION,PER_TABLE_CACHING,PER_TABLE_PARTITIONERS,RANGE_SCAN_DATA_VARIANT,RANGE_TOMBSTONES,ROLES,ROW_LEVEL_REPAIR,SCHEMA_COMMITLOG,SCHEMA_TABLES_V3,SEPARATE_PAGE_SIZE_AND_SAFETY_LIMIT,STREAM_WITH_RPC_STREAM,TOMBSTONE_GC_OPTIONS,TRUNCATION_TABLE,TYPED_ERRORS_IN_READ_RPC,UDA,UDA_NATIVE_PARALLELIZED_AGGREGATION,UNBOUNDED_RANGE_TOMBSTONES,VIEW_VIRTUAL_COLUMNS,WRITE_FAILURE_REPLY,XXHASH |         20.1.0 | {'-7033139225979025512'} |         null

(1 rows)

Tracing session: 599268b0-2b1c-11ee-8280-ae21d287702f

Unable to fetch query trace: print_formatted_result() takes exactly 5 arguments (3 given)
cqlsh:system> 

I think the error is a python error. (Did I mention that hate python? Always causes trouble :-) )

Is it related to any python version installed?

cs@cs-TUXEDO-Polaris-AMD-Gen3-CZN:~$ python3 --version
Python 3.10.6
cs@cs-TUXEDO-Polaris-AMD-Gen3-CZN:~$ python2.7 --version
Python 2.7.18
cs@cs-TUXEDO-Polaris-AMD-Gen3-CZN:~$ python2 --version
Python 2.7.18
cs@cs-TUXEDO-Polaris-AMD-Gen3-CZN:~$ python3.10 --version
Python 3.10.6

Can I do something to get a proper error/stacktrace?

@avikivity
Copy link
Member

Please run

DESCRIBE KEYSPACE system_tracing

and post the result. Maybe it's out of whack.

@horschi
Copy link
Author

horschi commented Jul 25, 2023

The datacenter matches the one in nodetool status:

cqlsh> DESCRIBE KEYSPACE system_traces ;

CREATE KEYSPACE system_traces WITH replication = {'class': 'NetworkTopologyStrategy', 'OSP': '1'}  AND durable_writes = true;

CREATE TABLE system_traces.node_slow_log (
    start_time timeuuid,
    node_ip inet,
    shard int,
    command text,
    date timestamp,
    duration int,
    parameters map<text, text>,
    session_id uuid,
    source_ip inet,
    table_names set<text>,
    username text,
    PRIMARY KEY (start_time, node_ip, shard)
) WITH CLUSTERING ORDER BY (node_ip ASC, shard ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 86400
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

CREATE TABLE system_traces.node_slow_log_time_idx (
    minute timestamp,
    started_at timestamp,
    session_id uuid,
    node_ip inet,
    shard int,
    start_time timeuuid,
    PRIMARY KEY (minute, started_at, session_id)
) WITH CLUSTERING ORDER BY (started_at ASC, session_id ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 86400
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

CREATE TABLE system_traces.sessions_time_idx (
    minute timestamp,
    started_at timestamp,
    session_id uuid,
    PRIMARY KEY (minute, started_at, session_id)
) WITH CLUSTERING ORDER BY (started_at ASC, session_id ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 86400
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

CREATE TABLE system_traces.events (
    session_id uuid,
    event_id timeuuid,
    activity text,
    scylla_parent_id bigint,
    scylla_span_id bigint,
    source inet,
    source_elapsed int,
    thread text,
    PRIMARY KEY (session_id, event_id)
) WITH CLUSTERING ORDER BY (event_id ASC)
    AND bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 86400
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

CREATE TABLE system_traces.sessions (
    session_id uuid PRIMARY KEY,
    client inet,
    command text,
    coordinator inet,
    duration int,
    parameters map<text, text>,
    request text,
    request_size int,
    response_size int,
    started_at timestamp,
    username text
) WITH bloom_filter_fp_chance = 0.01
    AND caching = {'keys': 'ALL', 'rows_per_partition': 'ALL'}
    AND comment = ''
    AND compaction = {'class': 'SizeTieredCompactionStrategy'}
    AND compression = {'sstable_compression': 'org.apache.cassandra.io.compress.LZ4Compressor'}
    AND crc_check_chance = 1.0
    AND dclocal_read_repair_chance = 0.0
    AND default_time_to_live = 86400
    AND gc_grace_seconds = 864000
    AND max_index_interval = 2048
    AND memtable_flush_period_in_ms = 0
    AND min_index_interval = 128
    AND read_repair_chance = 0.0
    AND speculative_retry = '99.0PERCENTILE';

cqlsh> 

@fruch
Copy link
Contributor

fruch commented Jul 30, 2023

this function was changed in:
9251b81

which seems like you are having some left over from older release in place

try deleting all *.pyc files, form the directory /opt/scylladb/share/cassandra/pylib/

and try it again ?

how did you installed scylla, with RPM/DEB ? or other means ?

@horschi
Copy link
Author

horschi commented Jul 31, 2023

Deleting the pyc files did the trick! It works now! Thanks!

I installed scylla using apt and updated it via apt. It got updated by changing the apt-url in the sources.list and running apt upgrade.

@fruch
Copy link
Contributor

fruch commented Jul 31, 2023

Deleting the pyc files did the trick! It works now! Thanks!

I installed scylla using apt and updated it via apt. It got updated by changing the apt-url in the sources.list and running apt upgrade.

We should have handled those better, I think from 5.4 we gonna have cqlsh coming from https://github.com/scylladb/scylla-cqlsh hopefully we are handling it better

@syuu1228 I think you addressed something like that in the newer cqlsh, right ?

@fruch
Copy link
Contributor

fruch commented Jul 31, 2023

Looks like in some version we didn't adhere to the spec:

https://www.debian.org/doc/packaging-manuals/python-policy/index.html#modules-byte-compilation

@mykaul
Copy link
Contributor

mykaul commented Dec 28, 2023

I'm not sure why this issue is here and not under cqlsh?

@fruch
Copy link
Contributor

fruch commented Dec 28, 2023

I'm not sure why this issue is here and not under cqlsh?

cause 5.1 don't have scylla-cqlsh, but it's coming from this repo

@fruch
Copy link
Contributor

fruch commented Dec 28, 2023

Also just confirm with 5.4 (that has scylla-cqlsh), it doesn't generate *.pyc files anymore
since its using scylla-python3

@mykaul
Copy link
Contributor

mykaul commented May 2, 2024

Can be closed, I believe.

@csposapiens
Copy link

Yes, I did not see this problem again.

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

No branches or pull requests

5 participants