Re: RMI TCP Connection threads
Restarting Cassandra helped. On Monday, July 29, 2019, 9:05:06 AM GMT+3, Dinesh Joshi wrote: Try obtaining a thread dump. It will help debug. Anything that goes via JMX such as nodetool could be responsible for it. Dinesh On Jul 28, 2019, at 10:57 PM, Vlad wrote: Hi, suddenly I noticed that one of three nodes started consume CPU in RMI TCP Connection threads. What it could be? Thanks.
RMI TCP Connection threads
Hi, suddenly I noticed that one of three nodes started consume CPU in RMI TCP Connection threads. What it could be? Thanks.
Re: Compaction throughput
Thanks! On Friday, July 19, 2019, 10:15:43 PM GMT+3, Jon Haddad wrote: It's a limit on the total compaction throughput. On Fri, Jul 19, 2019 at 10:39 AM Vlad wrote: Hi, is 'nodetool setcompactionthroughput' sets limit for all compactions on the node, or is it per compaction thread? Thanks.
Compaction throughput
Hi, is 'nodetool setcompactionthroughput' sets limit for all compactions on the node, or is it per compaction thread? Thanks.
Re: Python driver concistency problem
That's the issue - I do not use consistency ALL. I set QUORUM or ONE but it still performs with ALL. On Wednesday, May 22, 2019 12:42 PM, shalom sagges wrote: In a lot of cases, the issue is with the data model. Can you describe the table? Can you provide the query you use to retrieve the data?What's the load on your cluster?Are there lots of tombstones? You can set the consistency level to ONE, just to check if you get responses. Although normally I would never use ALL unless I run a DDL command. I prefer local_quorum if I want my consistency to be strong while keeping Cassandra's high availability. Regards,
Re: Python driver concistency problem
Hi, I do reads in my own Python code, how cqlsh can affect it? On Wednesday, May 22, 2019 12:02 PM, Chakravarthi Manepalli wrote: Hi Vlad, Maybe the consistency level has been set manually in CQLSH. Did you try checking your consistency level and set it back to normal? (Just a thought, Not sure!!) On Wed, May 22, 2019 at 2:00 PM Vlad wrote: Hi, we have three nodes cluster with KS defined as CREATE KEYSPACE someks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'some-dc': '3' } AND DURABLE_WRITES = true; next I read with Pyhton (cassandra-driver 3.11) from Cassandra 3.11.3 and get error Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 2 responses." info={'received_responses': 2, 'required_responses': 3, 'consistency': 'ALL'} nor session.default_consistency_level = ConsistencyLevel.QUORUM neither query = SimpleStatement("SELECT **", consistency_level=ConsistencyLevel.QUORUM) rows = session.execute(query) helps. What it could be? Thanks in advance.
Python driver concistency problem
Hi, we have three nodes cluster with KS defined as CREATE KEYSPACE someks WITH REPLICATION = { 'class' : 'org.apache.cassandra.locator.NetworkTopologyStrategy', 'some-dc': '3' } AND DURABLE_WRITES = true; next I read with Pyhton (cassandra-driver 3.11) from Cassandra 3.11.3 and get error Error from server: code=1200 [Coordinator node timed out waiting for replica nodes' responses] message="Operation timed out - received only 2 responses." info={'received_responses': 2, 'required_responses': 3, 'consistency': 'ALL'} nor session.default_consistency_level = ConsistencyLevel.QUORUM neither query = SimpleStatement("SELECT **", consistency_level=ConsistencyLevel.QUORUM) rows = session.execute(query) helps. What it could be? Thanks in advance.
Re: Wrong concistency level
Hi, thanks for answer. what I don't understand is: - why there are attempts of read repair if repair chances are 0.0 ?- what can be cause for big mutation size?- why hinted handoffs didn't prevent inconsistency? (because of big mutation size?) Thanks. On Tuesday, January 1, 2019 9:41 PM, Jeff Jirsa wrote: Read repair due to digest mismatch and speculative retry can both cause some behaviors that are hard to reason about (usually seen if a host stops accepting writes due to bad disk, which you havent described, but generally speaking, there are times when reads will block on writing to extra replicas). The patch from https://issues.apache.org/jira/browse/CASSANDRA-10726 changes this behavior significantly. The last message in this thread (about huge read repair mutations) suggests that your writes during the bounce got some partitions quite out of sync, and hints aren't replaying fast enough to fill in the gaps before you read, and the read repair is timing out. The read repair timing out wouldn't block the read after 10726, so if you're seeing read timeouts right now, what you probably want to do is run repair or read much smaller pages so that read repair succeeds, or increase your commitlog segment size from 32M to 128M or so until the read repair actually succeeds. On Tue, Jan 1, 2019 at 12:18 AM Vlad wrote: Hi All and Happy New Year!!! This year started with Cassandra 3.11.3 sometimes forces level ALL despite query level LOCAL_QUORUM (actually there is only one DC) and it fails with timeout. As far as I understand, it can be caused by read repair attempts (we see "DigestMismatch" errors in Cassandra log), but table has no read repair configured: AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.0 AND default_time_to_live = 0 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 = '99PERCENTILE'; Any suggestions? Thanks.
Re: Wrong concistency level
Also I see WARN [ReadRepairStage:341] 2018-12-31 17:57:58,594 DataResolver.java:507 - Encountered an oversized (37264537/16777216) read repair mutation for table for about several hours (5-7) after cluster restart, next it disappeared. On Tuesday, January 1, 2019 1:10 PM, Vlad wrote: Actually what happened is that Cassandra instances was upgraded to bigger size one by one, with downtime about one-two minutes each. There are logs INFO [HintsDispatcher:3] 2018-12-31 11:23:48,305 HintsDispatchExecutor.java:282 - Finished hinted handoff of file d2c7bb82-3d7a-43b2-8791-ef9c7c02b2c1-1546182664318-1.hints to endpoint /10.123.123.123: d2c7bb82-3d7a-43b2-8791-ef9c7c02b2c1 And from now on there is lot of Digest Mismatch exceptions in Cassandra log. What's going on? On Tuesday, January 1, 2019 10:18 AM, Vlad wrote: Hi All and Happy New Year!!! This year started with Cassandra 3.11.3 sometimes forces level ALL despite query level LOCAL_QUORUM (actually there is only one DC) and it fails with timeout. As far as I understand, it can be caused by read repair attempts (we see "DigestMismatch" errors in Cassandra log), but table has no read repair configured: AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.0 AND default_time_to_live = 0 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 = '99PERCENTILE'; Any suggestions? Thanks.
Re: Wrong concistency level
Actually what happened is that Cassandra instances was upgraded to bigger size one by one, with downtime about one-two minutes each. There are logs INFO [HintsDispatcher:3] 2018-12-31 11:23:48,305 HintsDispatchExecutor.java:282 - Finished hinted handoff of file d2c7bb82-3d7a-43b2-8791-ef9c7c02b2c1-1546182664318-1.hints to endpoint /10.123.123.123: d2c7bb82-3d7a-43b2-8791-ef9c7c02b2c1 And from now on there is lot of Digest Mismatch exceptions in Cassandra log. What's going on? On Tuesday, January 1, 2019 10:18 AM, Vlad wrote: Hi All and Happy New Year!!! This year started with Cassandra 3.11.3 sometimes forces level ALL despite query level LOCAL_QUORUM (actually there is only one DC) and it fails with timeout. As far as I understand, it can be caused by read repair attempts (we see "DigestMismatch" errors in Cassandra log), but table has no read repair configured: AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.0 AND default_time_to_live = 0 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 = '99PERCENTILE'; Any suggestions? Thanks.
Wrong concistency level
Hi All and Happy New Year!!! This year started with Cassandra 3.11.3 sometimes forces level ALL despite query level LOCAL_QUORUM (actually there is only one DC) and it fails with timeout. As far as I understand, it can be caused by read repair attempts (we see "DigestMismatch" errors in Cassandra log), but table has no read repair configured: AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'rows_per_partition': 'NONE'} AND comment = '' AND compaction = {'class': 'org.apache.cassandra.db.compaction.SizeTieredCompactionStrategy', 'max_threshold': '32', 'min_threshold': '4'} AND compression = {'chunk_length_in_kb': '64', 'class': 'org.apache.cassandra.io.compress.LZ4Compressor'} AND crc_check_chance = 1.0 AND dclocal_read_repair_chance = 0.0 AND default_time_to_live = 0 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 = '99PERCENTILE'; Any suggestions? Thanks.
Re: Scrub - autocompaction
Hi >you should reach an end as the scrub is applied to a list of sstables >calculated scrub start (I believe).What I observed is that in data folder >almost no original SSTables remained, but scrub still ran. So I suspect >processing each new appearing table. On Monday, October 29, 2018 8:34 PM, Alain RODRIGUEZ wrote: Hello, should autocompaction be disabled before running scrub? I would say the other way around, to be sure to leave some room to regular compactions, you could try to run scrub with the following option `nodetool scrub -j 1` (-j / --jobs allow controlling the number of compactor threads to use). Depending on the rhythm you want to give to compaction operations, you can tune this number and the ‘concurrent_compactor' option. It seems that scrub processes each new created table and never ends. Depending on the command that was run, if nothing was specified, nodetool scrub might be running on the whole node (or keyspace?), which can be a lot, so when an SSTable finishes, another might well start, for quite a while. But you should reach an end as the scrub is applied to a list of sstables calculated scrub start (I believe). Here is what I can share from my understanding. If you believe there might be an issue with your version of Cassandra or want to make sure that 'nodetool scrub' behaves as described, reading the code and/or observing writ time of the files that are getting compacted (SCRUB) is a way to go. C*heers,---Alain Rodriguez - alain@thelastpickle.comFrance / Spain The Last Pickle - Apache Cassandra Consultinghttp://www.thelastpickle.com Le lun. 29 oct. 2018 à 16:18, Vlad a écrit : Hi, should autocompaction be disabled before running scrub?It seems that scrub processes each new created table and never ends. Thanks.
Scrub - autocompaction
Hi, should autocompaction be disabled before running scrub?It seems that scrub processes each new created table and never ends. Thanks.
Re: Refering to non-existing node
Hi, this node isn't in system.peers on both nodes. On Thursday, September 6, 2018 10:02 PM, Michael Shuler wrote: On 09/06/2018 01:48 PM, Vlad wrote: > Hi, > 3 node cluster, Cassandra 3.9, GossipingPropertyFileSnitch, one DC > > I removed dead node with `nodetool assassinate`. It was also seed node, > so I removed it from seeds list on two other nodes and restarted them. > > But I still see in log > `DEBUG [GossipTasks:1] 2018-09-06 18:32:05,149 Gossiper.java:337 - > Convicting /10.100.129.116 with status LEFT - alive false` > > > What does this log mean? How can I get rid of this? https://twitter.com/faltering/status/559845791741657088 If you *only* used assassinate, without moving through the removal steps, then the node is still in the system.peers (I think) table on some or all of the nodes. -- Michael - To unsubscribe, e-mail: user-unsubscr...@cassandra.apache.org For additional commands, e-mail: user-h...@cassandra.apache.org
Re: URGENT: disable reads from node
Hi, this node isn't in system.peers on both nodes. On Wednesday, August 29, 2018 4:22 PM, Vlad wrote: Hi, >You'll need to disable the native transportWell, this is what I did already, >it seems repair is running I'm not sure whether repair will finish within 3 hours, but I can run it again (as it's incremental repair by default, right?) I'm not sure about RF=3 and QUORUM reads because of load/disk space constrains we have, but we'll definitely consider this. Thanks to all for help! On Wednesday, August 29, 2018 4:13 PM, Alexander Dejanovski wrote: Kurt is right. So here are the options I can think of : - use the join_ring false technique and rely on hints. You'll need to disable the native transport on the node as well to prevent direct connections to be made to it. Hopefully, you can run repair in less than 3 hours which is the hint window (hints will be collected while the node hasn't joined the ring). Otherwise you'll have more consistency issues after the node joins the ring again. Maybe incremental repair could help fixing this quickly afterwards if you've been running full repairs that involved anticompaction (if you're running at least Cassandra 2.2).- Fully re-bootstrap the node by replacing itself, using the replace_address_first_boot technique (but since you have RF=2, that would most probably mean some data loss since you read/write at ONE)- Try to cheat the dynamic snitch to take the node out of reads. You would then have the node join the ring normally, disable native transport and raise Severity (in org.apache.cassandra.db:type=DynamicEndpointSnitch) to something like 50 so the node won't be selected by the dynamic snitch. I guess the value will reset itself over time so you may need to set it to 50 on a regular basis while repair is happening. I would then strongly consider moving to RF=3 because RF=2 will lead you to this type of situation again in the future and does not allow quorum reads with fault tolerance. Good luck, On Wed, Aug 29, 2018 at 1:56 PM Vlad wrote: I restarted with cassandra.join_ring=falsenodetool status on other nodes shows this node as DN, while it see itself as UN. >I'd say best to just query at QUORUM until you can finish repairs.We have RH >2, so I guess QUORUM queries will fail. Also different application should be >changed for this. On Wednesday, August 29, 2018 2:41 PM, kurt greaves wrote: Note that you'll miss incoming writes if you do that, so you'll be inconsistent even after the repair. I'd say best to just query at QUORUM until you can finish repairs. On 29 August 2018 at 21:22, Alexander Dejanovski wrote: Hi Vlad, you must restart the node but first disable joining the cluster, as described in the second part of this blog post : http://thelastpickle.com/blog/ 2018/08/02/Re-Bootstrapping- Without-Bootstrapping.html Once repaired, you'll have to run "nodetool join" to start serving reads. Le mer. 29 août 2018 à 12:40, Vlad a écrit : Will it help to set read_repair_chance to 1 (compaction is SizeTieredCompactionStrategy)? On Wednesday, August 29, 2018 1:34 PM, Vlad wrote: Hi, quite urgent questions:due to disk and C* start problem we were forced to delete commit logs from one of nodes. Now repair is running, but meanwhile some reads bring no data (RF=2) Can this node be excluded from reads queries? And that all reads will be redirected to other node in the ring? Thanks to All for help. -- -Alexander DejanovskiFrance@alexanderdeja ConsultantApache Cassandra Consultinghttp://www.thelastpickle.com -- -Alexander DejanovskiFrance@alexanderdeja ConsultantApache Cassandra Consultinghttp://www.thelastpickle.com
Refering to non-existing node
Hi,3 node cluster, Cassandra 3.9, GossipingPropertyFileSnitch, one DC I removed dead node with `nodetool assassinate`. It was also seed node, so I removed it from seeds list on two other nodes and restarted them. But I still see in log `DEBUG [GossipTasks:1] 2018-09-06 18:32:05,149 Gossiper.java:337 - Convicting /10.100.129.116 with status LEFT - alive false` What does this log mean? How can I get rid of this? Thanks.
Re: URGENT: disable reads from node
Hi, >You'll need to disable the native transportWell, this is what I did already, >it seems repair is running I'm not sure whether repair will finish within 3 hours, but I can run it again (as it's incremental repair by default, right?) I'm not sure about RF=3 and QUORUM reads because of load/disk space constrains we have, but we'll definitely consider this. Thanks to all for help! On Wednesday, August 29, 2018 4:13 PM, Alexander Dejanovski wrote: Kurt is right. So here are the options I can think of : - use the join_ring false technique and rely on hints. You'll need to disable the native transport on the node as well to prevent direct connections to be made to it. Hopefully, you can run repair in less than 3 hours which is the hint window (hints will be collected while the node hasn't joined the ring). Otherwise you'll have more consistency issues after the node joins the ring again. Maybe incremental repair could help fixing this quickly afterwards if you've been running full repairs that involved anticompaction (if you're running at least Cassandra 2.2).- Fully re-bootstrap the node by replacing itself, using the replace_address_first_boot technique (but since you have RF=2, that would most probably mean some data loss since you read/write at ONE)- Try to cheat the dynamic snitch to take the node out of reads. You would then have the node join the ring normally, disable native transport and raise Severity (in org.apache.cassandra.db:type=DynamicEndpointSnitch) to something like 50 so the node won't be selected by the dynamic snitch. I guess the value will reset itself over time so you may need to set it to 50 on a regular basis while repair is happening. I would then strongly consider moving to RF=3 because RF=2 will lead you to this type of situation again in the future and does not allow quorum reads with fault tolerance. Good luck, On Wed, Aug 29, 2018 at 1:56 PM Vlad wrote: I restarted with cassandra.join_ring=falsenodetool status on other nodes shows this node as DN, while it see itself as UN. >I'd say best to just query at QUORUM until you can finish repairs.We have RH >2, so I guess QUORUM queries will fail. Also different application should be >changed for this. On Wednesday, August 29, 2018 2:41 PM, kurt greaves wrote: Note that you'll miss incoming writes if you do that, so you'll be inconsistent even after the repair. I'd say best to just query at QUORUM until you can finish repairs. On 29 August 2018 at 21:22, Alexander Dejanovski wrote: Hi Vlad, you must restart the node but first disable joining the cluster, as described in the second part of this blog post : http://thelastpickle.com/blog/ 2018/08/02/Re-Bootstrapping- Without-Bootstrapping.html Once repaired, you'll have to run "nodetool join" to start serving reads. Le mer. 29 août 2018 à 12:40, Vlad a écrit : Will it help to set read_repair_chance to 1 (compaction is SizeTieredCompactionStrategy)? On Wednesday, August 29, 2018 1:34 PM, Vlad wrote: Hi, quite urgent questions:due to disk and C* start problem we were forced to delete commit logs from one of nodes. Now repair is running, but meanwhile some reads bring no data (RF=2) Can this node be excluded from reads queries? And that all reads will be redirected to other node in the ring? Thanks to All for help. -- -Alexander DejanovskiFrance@alexanderdeja ConsultantApache Cassandra Consultinghttp://www.thelastpickle.com -- -Alexander DejanovskiFrance@alexanderdeja ConsultantApache Cassandra Consultinghttp://www.thelastpickle.com
Re: URGENT: disable reads from node
Also after restart with join_ring=false C* is still accepting connection on port 9042 (and obviously returning no data), so I run nodetool drainIs it good? I run nodetool repair on this node. Meanwhile command didn't return, but I see in log INFO [Thread-6] 2018-08-29 12:16:03,954 RepairRunnable.java:125 - Starting repair command #1, repairing keyspace scanrepo with repair options (parallelism: parallel, primary range: false, incremental: true, job threads: 1, ColumnFamilies: [], dataCenters: [], hosts: [], # of ranges: 530) ERROR [Thread-6] 2018-08-29 12:16:14,363 SystemDistributedKeyspace.java:306 - Error executing query INSERT INTO system_distributed.parent_repair_history (parent_id, keyspace_name, columnfamily_names, requested_ranges, started_at, options) VALUES (...) org.apache.cassandra.exceptions.WriteTimeoutException: Operation timed out - received only 0 responses. and nodetool compactionstats shows pending tasks: 9 - system_schema.tables: 1 - system_schema.keyspaces: 1 - ks1.tb1: 4 - ks1.tb2: 3 On Wednesday, August 29, 2018 2:57 PM, Vlad wrote: I restarted with cassandra.join_ring=falsenodetool status on other nodes shows this node as DN, while it see itself as UN. >I'd say best to just query at QUORUM until you can finish repairs.We have RH >2, so I guess QUORUM queries will fail. Also different application should be >changed for this. On Wednesday, August 29, 2018 2:41 PM, kurt greaves wrote: Note that you'll miss incoming writes if you do that, so you'll be inconsistent even after the repair. I'd say best to just query at QUORUM until you can finish repairs. On 29 August 2018 at 21:22, Alexander Dejanovski wrote: Hi Vlad, you must restart the node but first disable joining the cluster, as described in the second part of this blog post : http://thelastpickle.com/blog/ 2018/08/02/Re-Bootstrapping- Without-Bootstrapping.html Once repaired, you'll have to run "nodetool join" to start serving reads. Le mer. 29 août 2018 à 12:40, Vlad a écrit : Will it help to set read_repair_chance to 1 (compaction is SizeTieredCompactionStrategy)? On Wednesday, August 29, 2018 1:34 PM, Vlad wrote: Hi, quite urgent questions:due to disk and C* start problem we were forced to delete commit logs from one of nodes. Now repair is running, but meanwhile some reads bring no data (RF=2) Can this node be excluded from reads queries? And that all reads will be redirected to other node in the ring? Thanks to All for help. -- -Alexander DejanovskiFrance@alexanderdeja ConsultantApache Cassandra Consultinghttp://www.thelastpickle.com
Re: URGENT: disable reads from node
I restarted with cassandra.join_ring=falsenodetool status on other nodes shows this node as DN, while it see itself as UN. >I'd say best to just query at QUORUM until you can finish repairs.We have RH >2, so I guess QUORUM queries will fail. Also different application should be >changed for this. On Wednesday, August 29, 2018 2:41 PM, kurt greaves wrote: Note that you'll miss incoming writes if you do that, so you'll be inconsistent even after the repair. I'd say best to just query at QUORUM until you can finish repairs. On 29 August 2018 at 21:22, Alexander Dejanovski wrote: Hi Vlad, you must restart the node but first disable joining the cluster, as described in the second part of this blog post : http://thelastpickle.com/blog/ 2018/08/02/Re-Bootstrapping- Without-Bootstrapping.html Once repaired, you'll have to run "nodetool join" to start serving reads. Le mer. 29 août 2018 à 12:40, Vlad a écrit : Will it help to set read_repair_chance to 1 (compaction is SizeTieredCompactionStrategy)? On Wednesday, August 29, 2018 1:34 PM, Vlad wrote: Hi, quite urgent questions:due to disk and C* start problem we were forced to delete commit logs from one of nodes. Now repair is running, but meanwhile some reads bring no data (RF=2) Can this node be excluded from reads queries? And that all reads will be redirected to other node in the ring? Thanks to All for help. -- -Alexander DejanovskiFrance@alexanderdeja ConsultantApache Cassandra Consultinghttp://www.thelastpickle.com
Re: URGENT: disable reads from node
Will it help to set read_repair_chance to 1 (compaction is SizeTieredCompactionStrategy)? On Wednesday, August 29, 2018 1:34 PM, Vlad wrote: Hi, quite urgent questions:due to disk and C* start problem we were forced to delete commit logs from one of nodes. Now repair is running, but meanwhile some reads bring no data (RF=2) Can this node be excluded from reads queries? And that all reads will be redirected to other node in the ring? Thanks to All for help.
URGENT: disable reads from node
Hi, quite urgent questions:due to disk and C* start problem we were forced to delete commit logs from one of nodes. Now repair is running, but meanwhile some reads bring no data (RF=2) Can this node be excluded from reads queries? And that all reads will be redirected to other node in the ring? Thanks to All for help.
Re: ALTER default_time_to_live
Hi, thanks for answer! I've read article about TWCS, and I don't understand how claim "When rows reach their TTL (10 minutes here), they turn into tombstones. Our table defines that tombstones can be purged 1 minute after they were created.If all rows are created with the same TTL, SSTables will get 100% droppable tombstones eventually and perform full SSTable deletion instead of purging tombstones through compaction." goes with "Once the major compaction for a time window is completed, no further compaction of the data will ever occur." In above example TTL is 10 minutes, but time window is only one. As far as I understand C* never compacts passed bucket. Does it check tombstones anyway? On Thursday, January 18, 2018 1:32 PM, Alain RODRIGUEZ <arodr...@gmail.com> wrote: I set default_time_to_live for existing table. Does it affect existing data? No, it sets a default TTL for the future writes (that is no guarantee, as it can be overwritten in any specific query). It seems data to be deleted, but after compaction, I don't see any disk space freed as expected Indeed tombstones are responsible for tombstones eviction, yet there are some conditions to respect to be able to remove the tombstones (for consistency reasons). I detailed this last year, and even though the content is a bit old, main principles are still true and the tuning options are still relevant. About deletes and tombstones: http://thelastpickle.com/blog/2016/07/27/about-deletes-and-tombstones.html tl;dr: I would give a try to unchecked_tombstone_compaction: true. Maybe also consider using TWCS because of this "TTL is also ten days on one table and 100 days on other.". But I really recommend you to understand how this all work to act wisely. My guess can be wrong. About TWCS: http://thelastpickle.com/blog/2016/12/08/TWCS-part1.html C*heers,---Alain Rodriguez - @arodream - alain@thelastpickle.comFrance / Spain The Last Pickle - Apache Cassandra Consultinghttp://www.thelastpickle.com 2018-01-18 11:15 GMT+00:00 Vlad <qa23d-...@yahoo.com.invalid>: Hi, I set default_time_to_live for existing table. Does it affect existing data? It seems data to be deleted, but after compaction, I don't see any disk space freed as expected. Database has data for almost year, GC time is ten days, and TTL is also ten days on one table and 100 days on other. Cassandra version 3.11.0 Thanks.
ALTER default_time_to_live
Hi, I set default_time_to_live for existing table. Does it affect existing data? It seems data to be deleted, but after compaction, I don't see any disk space freed as expected. Database has data for almost year, GC time is ten days, and TTL is also ten days on one table and 100 days on other. Cassandra version 3.11.0 Thanks.
Anticompaction
Hi, I run repair, then I see that anticompaction started on all nodes.Does it mean that all data is already repaired. Actually I increased RF, so can I already use database? Thanks.
Re: Large tombstones creation
Hi, that's the issue, thanks! On Sunday, August 13, 2017 2:49 PM, Christophe Schmitz <christo...@instaclustr.com> wrote: Hi Vlad, Are you by any chance inserting null values? If so you will create tombstones. The work around (Cassandra >= 2.2) is to use unset on your bound statement (see https://issues.apache.org/jira/browse/CASSANDRA-7304) Cheers, Christophe On 13 August 2017 at 20:48, Vlad <qa23d-...@yahoo.com.invalid> wrote: Hi, I insert about 45000 rows to empty table in Python using prepared statements and IF NOT EXISTS. While reading after insert I get warnings likeServer warning: Read 5000 live rows and 33191 tombstone cells for query SELECT * FROM ... LIMIT 5000 (see tombstone_warn_threshold) How it can happen? I have several SASI indexes for this table, can this be a reason? Regards, Vlad -- Christophe Schmitz Director of consulting EMEA AU: +61 4 03751980 / FR: +33 7 82022899 Read our latest technical blog posts here.This email has been sent on behalf of Instaclustr Pty. Limited (Australia) and Instaclustr Inc (USA).This email and any attachments may contain confidential and legally privileged information. If you are not the intended recipient, do not copy or disclose its content, but please reply to this email immediately and highlight the error to the sender and then immediately delete the message.
Large tombstones creation
Hi, I insert about 45000 rows to empty table in Python using prepared statements and IF NOT EXISTS. While reading after insert I get warnings likeServer warning: Read 5000 live rows and 33191 tombstone cells for query SELECT * FROM ... LIMIT 5000 (see tombstone_warn_threshold) How it can happen? I have several SASI indexes for this table, can this be a reason? Regards, Vlad
SASI and secondary index simultaniously
Hi, it's possible to create both regular secondary index and SASI on the same column: CREATE TABLE ks.tb (id int PRIMARY KEY, name text); CREATE CUSTOM INDEX tb_name_idx_1 ON ks.tb (name) USING 'org.apache.cassandra.index.sasi.SASIIndex'; CREATE INDEX tb_name_idx ON ks.tb (name); But which one is used for SELECT? Assuming we have regular index and would like to migrate to SASI, can we first create SASI, than drop regular? And how can we check then index build is completed? Thanks.
stress tool: random seed
Hi, I'm populating database with YAML. Each time I run stress tool I get the same rows, i.e. the same data generated and no new rows appear. Is there any option to generate each time new data? I would like to test growing database, but don't want insert each time all data. I found a kind of workaround by changing partition key distribution boundaries, but is there better way? Regards, Vlad
Re: Multiple nodes decommission
>There's a system property (actually 2)Which ones? On Wednesday, April 19, 2017 9:17 AM, Jeff Jirsa <jji...@apache.org> wrote: On 2017-04-12 11:30 (-0700), Vlad <qa23d-...@yahoo.com> wrote: > Interesting, there is no such explicit warning for v.3 > https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html > It says > - Start the bootstrap node. > - verify that the node is fully bootstrapped and all other nodes are up >(UN) > > Does it mean that we should start them one by one? May somebody from > developers can clarify this issue? You should treat range movements (bootstrap/decom/etc) in 3.0 the same way you treated 2.0/2.1/2.2 - there's nothing special (as far as I know) to make it any more safe than 2.x was. The warnings and restrictions are because simultaneous range movements PROBABLY violate your assumed consistency guarantees if you're using vnodes. If you're using single token, this can be avoided. If you really know what you're doing, you can tell cassandra to let you do simultaneous range movements anyway. There's a system property (actually 2) that will let you tell cassandra you know the tradeoffs, and then you can bootstrap/decom/etc more than one node at a time. Generally, it's one of those things where if you have to ask about it, you probably should just stick to the default one-at-a-time guidelines (which isn't meant to sound condescending, but it's an area where you can definitely violate consistency and maybe even lose data if you're not sure). - Jeff
Spark node: use 127.0.0.1 for connection to Cassandra
Hi All, I have Cassandra with Spark on node 10.0.0.1 On other server I run ./spark-shell --master spark://10.0.0.1:7077and then set val conf = new SparkConf(true).set("spark.cassandra.connection.host", "10.0.0.1") It works, but I see in tcpdump that Spark node connects to Cassandra with address 10.0.0.1How can I cause node to use 127.0.0.1 (Cassandra listens on 0.0.0.0:9042) ? Thanks.
Re: Multiple nodes decommission
>range reassignments which becomes effective after a successful decommission. But during leaving nodes announce themselves as "leaving". Do other leaving nodes taking this into account and not stream data to them? (applicable also for joining). I hope so )) I guess problem with sequential adding/removing nodes is data overstreaming and non-even load distribution. I mean if we have three racks it's better to add/remove by three nodes (one in each rack) and to avoid state with four nodes, for example. Any thoughts? On Tuesday, April 11, 2017 7:55 PM, benjamin roth <brs...@gmail.com> wrote: I did not test it but I'd bet that parallel decommision will lead to inconsistencies.Each decommission results in range movements and range reassignments which becomes effective after a successful decommission.If you start several decommissions at once, I guess the calculated reassignments are invalid for at least one node after the first node finished the decommission process. I hope someone will correct me if i am wrong. 2017-04-11 18:43 GMT+02:00 Jacob Shadix <jacobsha...@gmail.com>: Are you using vnodes? I typically do one-by-one as the decommission will create additional load/network activity streaming data to the other nodes as the token ranges are reassigned. -- Jacob Shadix On Sat, Apr 8, 2017 at 10:55 AM, Vlad <qa23d-...@yahoo.com> wrote: Hi, how multiple nodes should be decommissioned by "nodetool decommission"- one by one or in parallel ? Thanks.
Re: Multiple nodes decommission
Interesting, there is no such explicit warning for v.3 https://docs.datastax.com/en/cassandra/3.0/cassandra/operations/opsAddNodeToCluster.html It says - Start the bootstrap node. - verify that the node is fully bootstrapped and all other nodes are up (UN) Does it mean that we should start them one by one? May somebody from developers can clarify this issue? On Wednesday, April 12, 2017 9:16 PM, Jacob Shadix <jacobsha...@gmail.com> wrote: It's still not recommended to start at the same time. Stagger by 2 minutes is what the following documentation suggests; along with additional steps. re. version 2.1 https://docs.datastax.com/en/cassandra/2.1/cassandra/operations/ops_add_node_to_cluster_t.html -- Jacob Shadix On Wed, Apr 12, 2017 at 1:48 PM, Vlad <qa23d-...@yahoo.com> wrote: But it seems OK to add multiple nodes at once, right? On Tuesday, April 11, 2017 8:38 PM, Jacob Shadix <jacobsha...@gmail.com> wrote: Right! Another reason why I just stick with sequential decommissions. Maybe someone here could shed some light on what happens under the covers if parallel decommissions are kicked off. -- Jacob Shadix On Tue, Apr 11, 2017 at 12:55 PM, benjamin roth <brs...@gmail.com> wrote: I did not test it but I'd bet that parallel decommision will lead to inconsistencies.Each decommission results in range movements and range reassignments which becomes effective after a successful decommission.If you start several decommissions at once, I guess the calculated reassignments are invalid for at least one node after the first node finished the decommission process. I hope someone will correct me if i am wrong. 2017-04-11 18:43 GMT+02:00 Jacob Shadix <jacobsha...@gmail.com>: Are you using vnodes? I typically do one-by-one as the decommission will create additional load/network activity streaming data to the other nodes as the token ranges are reassigned. -- Jacob Shadix On Sat, Apr 8, 2017 at 10:55 AM, Vlad <qa23d-...@yahoo.com> wrote: Hi, how multiple nodes should be decommissioned by "nodetool decommission"- one by one or in parallel ? Thanks.
Re: Multiple nodes decommission
But it seems OK to add multiple nodes at once, right? On Tuesday, April 11, 2017 8:38 PM, Jacob Shadix <jacobsha...@gmail.com> wrote: Right! Another reason why I just stick with sequential decommissions. Maybe someone here could shed some light on what happens under the covers if parallel decommissions are kicked off. -- Jacob Shadix On Tue, Apr 11, 2017 at 12:55 PM, benjamin roth <brs...@gmail.com> wrote: I did not test it but I'd bet that parallel decommision will lead to inconsistencies.Each decommission results in range movements and range reassignments which becomes effective after a successful decommission.If you start several decommissions at once, I guess the calculated reassignments are invalid for at least one node after the first node finished the decommission process. I hope someone will correct me if i am wrong. 2017-04-11 18:43 GMT+02:00 Jacob Shadix <jacobsha...@gmail.com>: Are you using vnodes? I typically do one-by-one as the decommission will create additional load/network activity streaming data to the other nodes as the token ranges are reassigned. -- Jacob Shadix On Sat, Apr 8, 2017 at 10:55 AM, Vlad <qa23d-...@yahoo.com> wrote: Hi, how multiple nodes should be decommissioned by "nodetool decommission"- one by one or in parallel ? Thanks.
Multiple nodes decommission
Hi, how multiple nodes should be decommissioned by "nodetool decommission"- one by one or in parallel ? Thanks.
Re: system_auth replication strategy
Actually if factor is equal to total number of nodes with SimpleStrategy one copy will be placed on each node.Does LOCAL_ONE know to choose local (the same) node with SimpleStrategy? On Sunday, April 2, 2017 4:02 PM, Sam Tunnicliffewrote: auth logins for super users is 101 replicas serving the read This only applies to the default superuser (i.e. 'cassandra'), which is one of the reasons for recommending it is only used during initial setup[1]. Reads for all other users, including superusers, are done at LOCAL_ONE [1] http://cassandra.apache.org/doc/latest/operating/security.html#authentication On Sun, Apr 2, 2017 at 7:07 AM, Jeff Jirsa wrote: > You should use a network topology strategy with high RF in each DC There's some debate here - some blogs/speakers will say to put a replica on each instance, but that falls down above a few dozen instances. Imagine if you have (for example) 200 instances per DC, auth logins for super users is 101 replicas serving the read - that's a really slow login that's likely to fail (think about thread pools on the coordinator doing the read response handling, it's an ugly ugly mess). Normal logins do use LOCAL_ONE though so if there are lots of replicas, auth will be faster - so use 5-10 replicas per DC, and crank up the caching timeouts as well
system_auth replication strategy
Hi, what is the suitable replication strategy for system_auth keyspace?As I understand factor should be equal to total nodes number, so can we use SimpleStrategy? Does it ensure that queries with LOCAL_ONE consistency level will be targeted to local DC (or the same node)? Thanks.
Re: Two DCs assandra on Azure connection problem.
Hi Cliff,great, it helps, thank you! So it's still strange for me why - as I mentioned "I suspected connectivity problem, but tcpdump shows constant traffic on port 7001 between nodes.", and even in unresponsive state there was packet exchange. Also I don't see in Cassandra code enabling SO_KEEPALIVE on storage port, only on CQL port.Nevertheless it works now, thanks again! Here is link to MSDN about this timeout - https://blogs.msdn.microsoft.com/cie/2014/02/13/windows-azure-load-balancer-timeout-for-cloud-service-roles-paas-webworker/ Regards, Vlad On Thursday, October 27, 2016 8:50 PM, Cliff Gilmore <cgilm...@datastax.com> wrote: Azure has aggressively low keepalive settings for it's networks. Ignore the Mongo parts of this link and have a look at the OS settings they change. https://docs.mongodb.com/ecosystem/platforms/windows-azure/ --- Cliff Gilmore Vanguard Solutions ArchitectM: 314-825-4413 DataStax, Inc. | www.DataStax.com On Thu, Oct 27, 2016 at 5:48 AM, Vlad <qa23d-...@yahoo.com> wrote: Hello, I put two nodes cluster on Azure. Each node in its own DC (ping about 10 ms.), inter-node connection (SSL port 7001) is going throw external IPs, i.e. listen_interface: eth0broadcast_address: 1.1.1.1 Cluster is starting, cqlsh can connect, stress-tool survives night of writes with replication factor two, all seems to be fine. But when cluster is leaved without load it becomes nonfunctional after several minutes of idle. Attempt to connect fails with error Connection error: ('Unable to connect to any servers', {'1.1.1.1': OperationTimedOut('errors= Timed out creating connection (10 seconds), last_host=None',)}) There is messageWARN 10:06:32 RequestExecutionException READ_TIMEOUT: Operation timed out - received only 1 responses. on one node six minutes after start (no load or connect in this time). nodetool status shows both nodes as UN (Up and Normal, I guess) I suspected connectivity problem, but tcpdump shows constant traffic on port 7001 between nodes. Restarting OTHER node than I'm connection to solves the problem for another several minutes. I increased TCP idle time in Azure IP address setting to 30 minutes, but it had no effect. Thanks, Vlad
Two DCs assandra on Azure connection problem.
Hello, I put two nodes cluster on Azure. Each node in its own DC (ping about 10 ms.), inter-node connection (SSL port 7001) is going throw external IPs, i.e. listen_interface: eth0broadcast_address: 1.1.1.1 Cluster is starting, cqlsh can connect, stress-tool survives night of writes with replication factor two, all seems to be fine. But when cluster is leaved without load it becomes nonfunctional after several minutes of idle. Attempt to connect fails with error Connection error: ('Unable to connect to any servers', {'1.1.1.1': OperationTimedOut('errors=Timed out creating connection (10 seconds), last_host=None',)}) There is messageWARN 10:06:32 RequestExecutionException READ_TIMEOUT: Operation timed out - received only 1 responses. on one node six minutes after start (no load or connect in this time). nodetool status shows both nodes as UN (Up and Normal, I guess) I suspected connectivity problem, but tcpdump shows constant traffic on port 7001 between nodes. Restarting OTHER node than I'm connection to solves the problem for another several minutes. I increased TCP idle time in Azure IP address setting to 30 minutes, but it had no effect. Thanks, Vlad
Re: Incremental repairs in 3.0
Thanks for answer! >It may still be a good idea to manually migrate if you have a sizable amount >of dataNo, it would be brand new ;-) 3.0 cluster On Tuesday, June 21, 2016 1:21 AM, Bryan Cheng <br...@blockcypher.com> wrote: Sorry, meant to say "therefore manual migration procedure should be UNnecessary" On Mon, Jun 20, 2016 at 3:21 PM, Bryan Cheng <br...@blockcypher.com> wrote: I don't use 3.x so hopefully someone with operational experience can chime in, however my understanding is: 1) Incremental repairs should be the default in the 3.x release branch and 2) sstable repairedAt is now properly set in all sstables as of 2.2.x for standard repairs and therefore manual migration procedure should be necessary. It may still be a good idea to manually migrate if you have a sizable amount of data and are using LCS as anticompaction is rather painful. On Sun, Jun 19, 2016 at 6:37 AM, Vlad <qa23d-...@yahoo.com> wrote: Hi, assuming I have new, empty Cassandra cluster, how should I start using incremental repairs? Is incremental repair is default now (as I don't see -inc option in nodetool) and nothing is needed to use it, or should we perform migration procedure anyway? And what happens to new column families? Regards.
Incremental repairs in 3.0
Hi, assuming I have new, empty Cassandra cluster, how should I start using incremental repairs? Is incremental repair is default now (as I don't see -inc option in nodetool) and nothing is needed to use it, or should we perform migration procedure anyway? And what happens to new column families? Regards.
Choosing production version
Before switching to tick-tock scheme one could choose latest previous x.y.z release, i.e. previous x.y with latest z to ensure maximum maturity and stability. Now obviously odd bug-fixes releases are preferable, but actually for even x.y (3.2, 3.4, etc.) only single bug fix release will be issued (may be besides urgent critical and security fixes). Thus currently there are no "stable" version, and odd numbered releases constantly accumulate new features from even versions. Just now 3.0.z is available, but what to take in future: latest "odd", or better previous "odds", to skip latest features and regression problem and to ensure no critical bugs found so far. But from other side previous "odds" have no latest fixes. So what is general production choosing recommendation now? Regards, Vlad
Re: Commit log size vs memtable total size
Tyler, thanks for explanation! So commit segment can contain both data from flushed table A and non-flushed table B.How is it replayed on start up? Does C* skip portions belonging to table A that already were written to SSTable? Regards, Vlad On Tuesday, March 1, 2016 11:37 PM, Tyler Hobbs <ty...@datastax.com> wrote: On Tue, Mar 1, 2016 at 6:13 AM, Vlad <qa23d-...@yahoo.com> wrote: So commit log can't keep more than memtable size, why is difference in commit log and memtables sizes? In order to purge a commitlog segment, all memtables that contain data from that segment must be flushed to disk. Suppose you have two tables: - table A has extremely high throughput - table B has low throughput Every commitlog segment will have a mixture of writes for table A and table B. The memtable for table A will fill up rapidly and will be flushed frequently. The memtable for table B will slowly filly up, and will not be flushed often. Since table B's memtable isn't flushed, none of the commit log segments can purged/recycled. Once the commitlog hits its size limit, it will force a flush of table B. This behavior is good, because it allows table B to be flushed in large chunks instead of hundreds of tiny sstables. If the commitlog space were equal to the memtable space, Cassandra would have to force a flush of table B's memtable approximately every time table A is flushed, despite being much smaller. To summarize: if you use more than one table, it makes sense to have a larger space for commitlog segments. -- Tyler Hobbs DataStax
Re: Practical limit on number of column families
>If your Jira search fu is strong enoughAnd it is! ) >you should be able to find it yourselfAnd I did! ) I see that this issue originates to problem with Java GC's design, but according to date it was Java 6 time. Now we have J8 with new GC mechanism. Is this problem still exists with J8? Any chances to use original method to reduce overhead and "be happy with the results"? Regards, Vlad On Tuesday, March 1, 2016 4:07 PM, Jack Krupansky <jack.krupan...@gmail.com> wrote: I'll defer to one of the senior committers as to whether they want that information disseminated any further than it already is. It was intentionally not documented since it is not recommended. If your Jira search fu is strong enough you should be able to find it yourself, but again, its use is strongly not recommended. As the Jira notes, "having more than dozens or hundreds of tables defined is almost certainly a Bad Idea." "Bad Idea" means not good. As in don't go there. And if you do, don't expect such a mis-adventure to be supported by the community. -- Jack Krupansky On Tue, Mar 1, 2016 at 8:39 AM, Vlad <qa23d-...@yahoo.com> wrote: Hi Jack, >you can reduce the overhead per table an undocumented Jira Can you please >point to this Jira number? >it is strongly not recommendedWhat is consequences of this (besides >performance degradation, if any)? Thanks. On Tuesday, March 1, 2016 7:23 AM, Jack Krupansky <jack.krupan...@gmail.com> wrote: 3,000 entries? What's an "entry"? Do you mean row, column, or... what? You are using the obsolete terminology of CQL2 and Thrift - column family. With CQL3 you should be creating "tables". The practical recommendation of an upper limit of a few hundred tables across all key spaces remains. Technically you can go higher and technically you can reduce the overhead per table (an undocumented Jira - intentionally undocumented since it is strongly not recommended), but... it is unlikely that you will be happy with the results. What is the nature of the use case? You basically have two choices: an additional cluster column to distinguish categories of table, or separate clusters for each few hundred of tables. -- Jack Krupansky On Mon, Feb 29, 2016 at 12:30 PM, Fernando Jimenez <fernando.jime...@wealth-port.com> wrote: Hi all I have a use case for Cassandra that would require creating a large number of column families. I have found references to early versions of Cassandra where each column family would require a fixed amount of memory on all nodes, effectively imposing an upper limit on the total number of CFs. I have also seen rumblings that this may have been fixed in later versions. To put the question to rest, I have setup a DSE sandbox and created some code to generate column families populated with 3,000 entries each. Unfortunately I have now hit this issue: https://issues.apache.org/jira/browse/CASSANDRA-9291 So I will have to retest against Cassandra 3.0 instead However, I would like to understand the limitations regarding creation of column families. * Is there a practical upper limit? * is this a fixed limit, or does it scale as more nodes are added into the cluster? * Is there a difference between one keyspace with thousands of column families, vs thousands of keyspaces with only a few column families each? I haven’t found any hard evidence/documentation to help me here, but if you can point me in the right direction, I will oblige and RTFM away. Many thanks for your help! CheersFJ
Re: Practical limit on number of column families
Hi Jack, >you can reduce the overhead per table an undocumented Jira Can you please >point to this Jira number? >it is strongly not recommendedWhat is consequences of this (besides >performance degradation, if any)? Thanks. On Tuesday, March 1, 2016 7:23 AM, Jack Krupanskywrote: 3,000 entries? What's an "entry"? Do you mean row, column, or... what? You are using the obsolete terminology of CQL2 and Thrift - column family. With CQL3 you should be creating "tables". The practical recommendation of an upper limit of a few hundred tables across all key spaces remains. Technically you can go higher and technically you can reduce the overhead per table (an undocumented Jira - intentionally undocumented since it is strongly not recommended), but... it is unlikely that you will be happy with the results. What is the nature of the use case? You basically have two choices: an additional cluster column to distinguish categories of table, or separate clusters for each few hundred of tables. -- Jack Krupansky On Mon, Feb 29, 2016 at 12:30 PM, Fernando Jimenez wrote: Hi all I have a use case for Cassandra that would require creating a large number of column families. I have found references to early versions of Cassandra where each column family would require a fixed amount of memory on all nodes, effectively imposing an upper limit on the total number of CFs. I have also seen rumblings that this may have been fixed in later versions. To put the question to rest, I have setup a DSE sandbox and created some code to generate column families populated with 3,000 entries each. Unfortunately I have now hit this issue: https://issues.apache.org/jira/browse/CASSANDRA-9291 So I will have to retest against Cassandra 3.0 instead However, I would like to understand the limitations regarding creation of column families. * Is there a practical upper limit? * is this a fixed limit, or does it scale as more nodes are added into the cluster? * Is there a difference between one keyspace with thousands of column families, vs thousands of keyspaces with only a few column families each? I haven’t found any hard evidence/documentation to help me here, but if you can point me in the right direction, I will oblige and RTFM away. Many thanks for your help! CheersFJ
Commit log size vs memtable total size
Hi,there are following parameters in casansdra.yaml: memtable_total_space_in_mb (1/4 of heap, e.g. 512MB)- Specifies the total memory used for all memtables on a node. commitlog_total_space_in_mb (8GB) - Total space used for commit logs. If the used space goes above this value, Cassandra rounds up to the next nearest segment multiple and flushes memtables to disk for the oldest commitlog segments, removing those log segments. My question is what is meaning of commit log size being much more than memtables size. >From manual: "Cassandra flushes memtables to disk, creating SSTables when the >commit log space threshold has been exceeded.", but as far as I understand >memtables are also flushed when too much memtables are used and anyway >unflashed size can't be more than memtable size in memory. So commit log >can't keep more than memtable size, why is difference in commit log and >memtables sizes? Regards, Vlad
Re: Cassandra C client implementation
Hello, Sorry, wrong link in the previous email. Proper link is http://svn.apache.org/viewvc/thrift/trunk/lib/c_glib/test/ Regards, Vlad Paiu OpenSIPS Developer On 12/15/2011 08:35 PM, Vlad Paiu wrote: Hello, While digging more for this I've found these : http://svn.apache.org/viewvc/thrift/lib/c_glib/test/ Which shows how to create the TSocket and TTransport structures, very similar to the way it's done in C++. Now I'm stuck on how to create the actual connection to the Cassandra server. It should be a function generated by the Cassandra thrift interface, but I can't seem to find the proper one. Any help would be very much appreciated. Regards, Vlad Mina Naguibmina.nag...@bloomdigital.com wrote: Hi Vlad I'm the author of libcassie. For what it's worth, it's in production where I work, consuming a heavily-used cassandra 0.7.9 cluster. We do have plans to upgrade the cluster to 1.x, to benefit from all the improvements, CQL, etc... but that includes revising all our clients (across several programming languages). So, it's definitely on my todo list to address our C clients by either upgrading libcassie, or possibly completely rewriting it. Currently it's a wrapper around the C++ parent project libcassandra. I haven't been fond of having that many layered abstractions, and the thrift Glib2 interface has definitely piqued my interest, so I'm leaning towards a complete rewrite. While we're at it, it would also be nice to have features like asynchronous modes for popular event loops, connection pooling, etc. Unfortunately, I have no milestones set for any of this, nor the time (currently) to experiment and proof-of-concept it. I'd be curious to hear from other C hackers whether they've experimented with the thrift Glib2 interface and gotten a hello world to work against cassandra 1.x. Perhaps there's room for some code sharing/collaboration on a new library to supersede the existing libcassie+libcassandra. On 2011-12-14, at 5:16 PM, Vlad Paiu wrote: Hello Eric, We have that, thanks alot for the contribution. The idea is to not play around with including C++ code in a C app, if there's an alternative ( the thrift g_libc ). Unfortunately, since thrift does not generate a skeleton for the glibc code, I don't know how to find out what the API functions are called, and guessing them is not going that good :) I'll wait a little longer see if anybody can help with the C thrift, or at least tell me it's not working. :) Regards, Vlad Eric Tammeeta...@gmail.com wrote: On 12/14/2011 04:18 PM, Vlad Paiu wrote: Hi, Just tried libcassie and seems it's not compatible with latest cassandra, as even simple inserts and fetches fail with InvalidRequestException... So can anybody please provide a very simple example in C for connecting fetching columns with thrift ? Regards, Vlad Vlad Paiuvladp...@opensips.org wrote: Vlad, We have written a specific cassandra db module for usrloc with opensips and have open sourced it on github. We use the thrift generated c++ bindings and extern stuff to c. I spoke to bogdan about this a while ago, and gave him the github link, but here it is for your reference https://github.com/junction/db_jnctn_usrloc Hopefully that helps. I idle in #opensips too, just ask about cassandra in there and I'll probably see it. - Eric Tamme
Re: Cassandra C client implementation
Hi, I've also decided to give the C++ Thrift a try, but I can't seem to compile the simple examples from http://wiki.apache.org/cassandra/ThriftExamples . I get lots of errors like : /usr/local/include/thrift/transport/TTransport.h:34:1: error: ‘uint32_t’ does not name a type /usr/local/include/thrift/transport/TTransport.h:56:1: error: expected unqualified-id before ‘class’ /usr/local/include/thrift/transport/TTransport.h:262:29: error: ‘TTransport’ was not declared in this scope /usr/local/include/thrift/transport/TTransport.h:262:39: error: template argument 1 is invalid /usr/local/include/thrift/transport/TTransport.h:262:72: error: ‘TTransport’ was not declared in this scope /usr/local/include/thrift/transport/TTransport.h:262:82: error: template argument 1 is invalid Thrift version is 0.8, installed from sources, Cassandra version in 1.0.6. Any ideas ? Regards, Vlad Paiu OpenSIPS Developer On 12/16/2011 11:02 AM, Vlad Paiu wrote: Hello, Sorry, wrong link in the previous email. Proper link is http://svn.apache.org/viewvc/thrift/trunk/lib/c_glib/test/ Regards, Vlad Paiu OpenSIPS Developer On 12/15/2011 08:35 PM, Vlad Paiu wrote: Hello, While digging more for this I've found these : http://svn.apache.org/viewvc/thrift/lib/c_glib/test/ Which shows how to create the TSocket and TTransport structures, very similar to the way it's done in C++. Now I'm stuck on how to create the actual connection to the Cassandra server. It should be a function generated by the Cassandra thrift interface, but I can't seem to find the proper one. Any help would be very much appreciated. Regards, Vlad Mina Naguibmina.nag...@bloomdigital.com wrote: Hi Vlad I'm the author of libcassie. For what it's worth, it's in production where I work, consuming a heavily-used cassandra 0.7.9 cluster. We do have plans to upgrade the cluster to 1.x, to benefit from all the improvements, CQL, etc... but that includes revising all our clients (across several programming languages). So, it's definitely on my todo list to address our C clients by either upgrading libcassie, or possibly completely rewriting it. Currently it's a wrapper around the C++ parent project libcassandra. I haven't been fond of having that many layered abstractions, and the thrift Glib2 interface has definitely piqued my interest, so I'm leaning towards a complete rewrite. While we're at it, it would also be nice to have features like asynchronous modes for popular event loops, connection pooling, etc. Unfortunately, I have no milestones set for any of this, nor the time (currently) to experiment and proof-of-concept it. I'd be curious to hear from other C hackers whether they've experimented with the thrift Glib2 interface and gotten a hello world to work against cassandra 1.x. Perhaps there's room for some code sharing/collaboration on a new library to supersede the existing libcassie+libcassandra. On 2011-12-14, at 5:16 PM, Vlad Paiu wrote: Hello Eric, We have that, thanks alot for the contribution. The idea is to not play around with including C++ code in a C app, if there's an alternative ( the thrift g_libc ). Unfortunately, since thrift does not generate a skeleton for the glibc code, I don't know how to find out what the API functions are called, and guessing them is not going that good :) I'll wait a little longer see if anybody can help with the C thrift, or at least tell me it's not working. :) Regards, Vlad Eric Tammeeta...@gmail.com wrote: On 12/14/2011 04:18 PM, Vlad Paiu wrote: Hi, Just tried libcassie and seems it's not compatible with latest cassandra, as even simple inserts and fetches fail with InvalidRequestException... So can anybody please provide a very simple example in C for connecting fetching columns with thrift ? Regards, Vlad Vlad Paiuvladp...@opensips.org wrote: Vlad, We have written a specific cassandra db module for usrloc with opensips and have open sourced it on github. We use the thrift generated c++ bindings and extern stuff to c. I spoke to bogdan about this a while ago, and gave him the github link, but here it is for your reference https://github.com/junction/db_jnctn_usrloc Hopefully that helps. I idle in #opensips too, just ask about cassandra in there and I'll probably see it. - Eric Tamme
Re: Cassandra C client implementation
Hello, Congratulations on your work on libcassandra libcassie. I agree with you that too many abstractions are not a good thing, that's why I think thrift glib are a much better way to go than thrift cpp libcassandra libcassie. I as well am looking for a very basic Thrift glibc example for Cassandra, with no 'advanced' features like connection pooling, asynchronous stuff, etc. Just a plain simple connection, an insert and a column fetch that works with the latest 1.x Cassandra. I think it would be a great starting point and we could move on from there. Regards, Vlad Paiu OpenSIPS Developer On 12/15/2011 03:53 AM, Mina Naguib wrote: Hi Vlad I'm the author of libcassie. For what it's worth, it's in production where I work, consuming a heavily-used cassandra 0.7.9 cluster. We do have plans to upgrade the cluster to 1.x, to benefit from all the improvements, CQL, etc... but that includes revising all our clients (across several programming languages). So, it's definitely on my todo list to address our C clients by either upgrading libcassie, or possibly completely rewriting it. Currently it's a wrapper around the C++ parent project libcassandra. I haven't been fond of having that many layered abstractions, and the thrift Glib2 interface has definitely piqued my interest, so I'm leaning towards a complete rewrite. While we're at it, it would also be nice to have features like asynchronous modes for popular event loops, connection pooling, etc. Unfortunately, I have no milestones set for any of this, nor the time (currently) to experiment and proof-of-concept it. I'd be curious to hear from other C hackers whether they've experimented with the thrift Glib2 interface and gotten a hello world to work against cassandra 1.x. Perhaps there's room for some code sharing/collaboration on a new library to supersede the existing libcassie+libcassandra. On 2011-12-14, at 5:16 PM, Vlad Paiu wrote: Hello Eric, We have that, thanks alot for the contribution. The idea is to not play around with including C++ code in a C app, if there's an alternative ( the thrift g_libc ). Unfortunately, since thrift does not generate a skeleton for the glibc code, I don't know how to find out what the API functions are called, and guessing them is not going that good :) I'll wait a little longer see if anybody can help with the C thrift, or at least tell me it's not working. :) Regards, Vlad Eric Tammeeta...@gmail.com wrote: On 12/14/2011 04:18 PM, Vlad Paiu wrote: Hi, Just tried libcassie and seems it's not compatible with latest cassandra, as even simple inserts and fetches fail with InvalidRequestException... So can anybody please provide a very simple example in C for connecting fetching columns with thrift ? Regards, Vlad Vlad Paiuvladp...@opensips.org wrote: Vlad, We have written a specific cassandra db module for usrloc with opensips and have open sourced it on github. We use the thrift generated c++ bindings and extern stuff to c. I spoke to bogdan about this a while ago, and gave him the github link, but here it is for your reference https://github.com/junction/db_jnctn_usrloc Hopefully that helps. I idle in #opensips too, just ask about cassandra in there and I'll probably see it. - Eric Tamme
Re: Cassandra C client implementation
Hello, While digging more for this I've found these : http://svn.apache.org/viewvc/thrift/lib/c_glib/test/ Which shows how to create the TSocket and TTransport structures, very similar to the way it's done in C++. Now I'm stuck on how to create the actual connection to the Cassandra server. It should be a function generated by the Cassandra thrift interface, but I can't seem to find the proper one. Any help would be very much appreciated. Regards, Vlad Mina Naguib mina.nag...@bloomdigital.com wrote: Hi Vlad I'm the author of libcassie. For what it's worth, it's in production where I work, consuming a heavily-used cassandra 0.7.9 cluster. We do have plans to upgrade the cluster to 1.x, to benefit from all the improvements, CQL, etc... but that includes revising all our clients (across several programming languages). So, it's definitely on my todo list to address our C clients by either upgrading libcassie, or possibly completely rewriting it. Currently it's a wrapper around the C++ parent project libcassandra. I haven't been fond of having that many layered abstractions, and the thrift Glib2 interface has definitely piqued my interest, so I'm leaning towards a complete rewrite. While we're at it, it would also be nice to have features like asynchronous modes for popular event loops, connection pooling, etc. Unfortunately, I have no milestones set for any of this, nor the time (currently) to experiment and proof-of-concept it. I'd be curious to hear from other C hackers whether they've experimented with the thrift Glib2 interface and gotten a hello world to work against cassandra 1.x. Perhaps there's room for some code sharing/collaboration on a new library to supersede the existing libcassie+libcassandra. On 2011-12-14, at 5:16 PM, Vlad Paiu wrote: Hello Eric, We have that, thanks alot for the contribution. The idea is to not play around with including C++ code in a C app, if there's an alternative ( the thrift g_libc ). Unfortunately, since thrift does not generate a skeleton for the glibc code, I don't know how to find out what the API functions are called, and guessing them is not going that good :) I'll wait a little longer see if anybody can help with the C thrift, or at least tell me it's not working. :) Regards, Vlad Eric Tamme eta...@gmail.com wrote: On 12/14/2011 04:18 PM, Vlad Paiu wrote: Hi, Just tried libcassie and seems it's not compatible with latest cassandra, as even simple inserts and fetches fail with InvalidRequestException... So can anybody please provide a very simple example in C for connecting fetching columns with thrift ? Regards, Vlad Vlad Paiuvladp...@opensips.org wrote: Vlad, We have written a specific cassandra db module for usrloc with opensips and have open sourced it on github. We use the thrift generated c++ bindings and extern stuff to c. I spoke to bogdan about this a while ago, and gave him the github link, but here it is for your reference https://github.com/junction/db_jnctn_usrloc Hopefully that helps. I idle in #opensips too, just ask about cassandra in there and I'll probably see it. - Eric Tamme
Cassandra C client implementation
Hello, I am trying to integrate some Cassandra related ops ( insert, get, etc ) into an application written entirelly in C, so C++ is not an option. Is there any C client library for cassandra ? I have also tried to generate thrift glibc code for Cassandra, but on wiki.apache.org/cassandra/ThriftExamples I cannot find an example for C. Can anybody suggest a C client library for Cassandra or provide some working examples for Thrift in C ? Thanks and Regards, Vlad
Re: Cassandra C client implementation
Hello, Thanks for your answer. Unfortunately libcassandra is C++ , I'm looking for something written in ANSI C. I've searched alot and my guess is glibc thrift is my only option, but I could not find even one example onto how to make a connection some queries to Cassandra using glibc thrift. Does anyone have experience/some examples for this ? Regards, Vlad i...@iyyang.com wrote: BTW please use https://github.com/eyealike/libcassandra Best Regards, Yi Steve Yang ~~~ +1-401-441-5086 +86-13910771510 Sent via BlackBerry® from China Mobile -Original Message- From: i...@iyyang.com Date: Wed, 14 Dec 2011 15:52:56 To: user@cassandra.apache.org Reply-To: i...@iyyang.com Subject: Re: Cassandra C client implementation Try libcassandra, but it doesn't support connection pooling --Original Message-- From: Vlad Paiu To: user@cassandra.apache.org ReplyTo: user@cassandra.apache.org Subject: Cassandra C client implementation Sent: Dec 14, 2011 11:11 PM Hello, I am trying to integrate some Cassandra related ops ( insert, get, etc ) into an application written entirelly in C, so C++ is not an option. Is there any C client library for cassandra ? I have also tried to generate thrift glibc code for Cassandra, but on wiki.apache.org/cassandra/ThriftExamples I cannot find an example for C. Can anybody suggest a C client library for Cassandra or provide some working examples for Thrift in C ? Thanks and Regards, Vlad Best Regards, Yi Steve Yang ~~~ +1-401-441-5086 +86-13910771510 Sent via BlackBerry® from China Mobile
Re: Cassandra C client implementation
Hello, Thanks very much for your suggestions. Libcassie seems nice but doesn't seem like it's actively maintained and i'm not sure if it's compatible with latest Cassandra versions. Will give it a try though. I was looking through the generated thrift .c files and I can't seem to find what function to call to init a connection to a Cassandra instance. Any ideas ? Thanks and Regards, Vlad Jeremiah Jordan jeremiah.jor...@morningstar.com wrote: If you are OK linking to a C++ based library you can look at: https://github.com/minaguib/libcassandra/tree/kickstart-libcassie-0.7/libcassie It is wrapper code around libcassandra which exports a C++ interface. If you look at the function names etc in the other languages, just use the similar functions from the c_glib thrift... If you are going to mess with using the c_glib thrift, make sure to check out the JIRA for it, it is new and has some issues... https://issues.apache.org/jira/browse/THRIFT/component/12313854 On 12/14/2011 09:11 AM, Vlad Paiu wrote: Hello, I am trying to integrate some Cassandra related ops ( insert, get, etc ) into an application written entirelly in C, so C++ is not an option. Is there any C client library for cassandra ? I have also tried to generate thrift glibc code for Cassandra, but on wiki.apache.org/cassandra/ThriftExamples I cannot find an example for C. Can anybody suggest a C client library for Cassandra or provide some working examples for Thrift in C ? Thanks and Regards, Vlad
Re: Cassandra C client implementation
Hi, Just tried libcassie and seems it's not compatible with latest cassandra, as even simple inserts and fetches fail with InvalidRequestException... So can anybody please provide a very simple example in C for connecting fetching columns with thrift ? Regards, Vlad Vlad Paiu vladp...@opensips.org wrote: Hello, Thanks very much for your suggestions. Libcassie seems nice but doesn't seem like it's actively maintained and i'm not sure if it's compatible with latest Cassandra versions. Will give it a try though. I was looking through the generated thrift .c files and I can't seem to find what function to call to init a connection to a Cassandra instance. Any ideas ? Thanks and Regards, Vlad Jeremiah Jordan jeremiah.jor...@morningstar.com wrote: If you are OK linking to a C++ based library you can look at: https://github.com/minaguib/libcassandra/tree/kickstart-libcassie-0.7/libcassie It is wrapper code around libcassandra which exports a C++ interface. If you look at the function names etc in the other languages, just use the similar functions from the c_glib thrift... If you are going to mess with using the c_glib thrift, make sure to check out the JIRA for it, it is new and has some issues... https://issues.apache.org/jira/browse/THRIFT/component/12313854 On 12/14/2011 09:11 AM, Vlad Paiu wrote: Hello, I am trying to integrate some Cassandra related ops ( insert, get, etc ) into an application written entirelly in C, so C++ is not an option. Is there any C client library for cassandra ? I have also tried to generate thrift glibc code for Cassandra, but on wiki.apache.org/cassandra/ThriftExamples I cannot find an example for C. Can anybody suggest a C client library for Cassandra or provide some working examples for Thrift in C ? Thanks and Regards, Vlad
Re: Cassandra C client implementation
Hello Eric, We have that, thanks alot for the contribution. The idea is to not play around with including C++ code in a C app, if there's an alternative ( the thrift g_libc ). Unfortunately, since thrift does not generate a skeleton for the glibc code, I don't know how to find out what the API functions are called, and guessing them is not going that good :) I'll wait a little longer see if anybody can help with the C thrift, or at least tell me it's not working. :) Regards, Vlad Eric Tamme eta...@gmail.com wrote: On 12/14/2011 04:18 PM, Vlad Paiu wrote: Hi, Just tried libcassie and seems it's not compatible with latest cassandra, as even simple inserts and fetches fail with InvalidRequestException... So can anybody please provide a very simple example in C for connecting fetching columns with thrift ? Regards, Vlad Vlad Paiuvladp...@opensips.org wrote: Vlad, We have written a specific cassandra db module for usrloc with opensips and have open sourced it on github. We use the thrift generated c++ bindings and extern stuff to c. I spoke to bogdan about this a while ago, and gave him the github link, but here it is for your reference https://github.com/junction/db_jnctn_usrloc Hopefully that helps. I idle in #opensips too, just ask about cassandra in there and I'll probably see it. - Eric Tamme
Re: Cassandra Counters and TTL
Hello, Thanks for your answer. See my reply in-line. On 11/04/2011 01:46 PM, Amit Chavan wrote: Answers inline. On Fri, Nov 4, 2011 at 4:59 PM, Vlad Paiu vladp...@opensips.org mailto:vladp...@opensips.org wrote: Hello, I'm a new user of Cassandra and I think it's great. Still, while developing my APP using Cassandra, I got stuck with some things and I'm not really sure that Cassandra can handle them at the moment. So, first of all, does Cassandra allow for Counters and regular Keys to be located in the same ColumnFamily ? What do you mean when you say regular Keys? If you are hinting at columns apart from counters, then the answer is *no*: only counters can exist in a CounterColumnFamily and other column families cannot hold counters. Yes, this is what I was asking. Thanks for the answer. Secondly, is there any way to dynamically set the TTL for a key ? In the sense that I have a key, I initially set it with no TTL, but after a while I decide that it should expire in 100 seconds. Can Cassandra do this ? TTL is not for one key, it is for one column. When I was saying 'Key' I actually meant to say column. Seems I'm not yet very acquainted with Cassandra terminology. So in the end, can you dynamically alter the TTL of a Column ? 3. Can counters have a TTL ? No. Currently, counters do not (or if I am correct - cannot) have TTL. Ok. Any info if this will be implemented anytime soon ? 4. Is there any way to atomically reset a counter ? I read on the website that the only way to do it is read the variable value, and then set it to -value, which seems rather bogus to me. I think that is the only way to reset a counter. I would like to know if there is another way. Ok then, waiting for someone to confirm. It's bad that you cannot atomically reset a counter value, as a two-way resetting might lead to undetermined behaviour. Also, can I set the counter to a specific value, without keeping state on the client ? For example, if the client does not know the current counter value is 3. Can it set the counter value to 10, without first getting the counter value, and then incrementing by 7 ? Background: I am using Cassandra since the past two months. Hope the community corrects me if I am wrong. Regards, -- Vlad Paiu OpenSIPS Developer -- Regards Amit S. Chavan Regards, Vlad Paiu OpenSIPS Developer
Cassandra Counters and TTL
Hello, I'm a new user of Cassandra and I think it's great. Still, while developing my APP using Cassandra, I got stuck with some things and I'm not really sure that Cassandra can handle them at the moment. So, first of all, does Cassandra allow for Counters and regular Keys to be located in the same ColumnFamily ? Secondly, is there any way to dynamically set the TTL for a key ? In the sense that I have a key, I initially set it with no TTL, but after a while I decide that it should expire in 100 seconds. Can Cassandra do this ? 3. Can counters have a TTL ? 4. Is there any way to atomically reset a counter ? I read on the website that the only way to do it is read the variable value, and then set it to -value, which seems rather bogus to me. Regards, -- Vlad Paiu OpenSIPS Developer