You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cassandra.apache.org by "Stefan Miklosovic (Jira)" <ji...@apache.org> on 2022/04/20 14:02:00 UTC

[jira] [Comment Edited] (CASSANDRA-17180) Implement startup check to prevent Cassandra start to spread zombie data

    [ https://issues.apache.org/jira/browse/CASSANDRA-17180?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17524999#comment-17524999 ] 

Stefan Miklosovic edited comment on CASSANDRA-17180 at 4/20/22 2:01 PM:
------------------------------------------------------------------------

I think it is viable to do via "SchemaKeyspace.fetchNonSystemKeyspaces()". It will make a query and it will return Keyspaces with all metadata etc.

However, I identified that this method has a bug in it. It will not return only user keyspaces but it will return also system_traces so SchemaConstants#LOCAL_SYSTEM_KEYSPACE_NAMES is likely missing it. I ll take a look.

One more detail to mention is that SchemaKeyspace.fetchNonSystemKeyspaces is package protected, I had to make it public. There are other methods of the similar fashion which are private too. I am not sure I can make this method publicly visible without any conseqencies yet.


was (Author: smiklosovic):
I think it is viable to do via "SchemaKeyspace.fetchNonSystemKeyspaces()". It will make a query and it will return Keyspaces with all metadata etc.

However, I identified that this method has a bug in it. It will not return only user keyspaces but it will return also system_traces.events and system_traces.sessions so SchemaConstants#LOCAL_SYSTEM_KEYSPACE_NAMES is likely missing these two. I ll take a look.

One more detail to mention is that SchemaKeyspace.fetchNonSystemKeyspaces is package protected, I had to make it public. There are other methods of the similar fashion which are private too. I am not sure I can make this method publicly visible without any conseqencies yet.

> Implement startup check to prevent Cassandra start to spread zombie data
> ------------------------------------------------------------------------
>
>                 Key: CASSANDRA-17180
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-17180
>             Project: Cassandra
>          Issue Type: New Feature
>          Components: Legacy/Observability
>            Reporter: Stefan Miklosovic
>            Assignee: Stefan Miklosovic
>            Priority: Normal
>          Time Spent: 9.5h
>  Remaining Estimate: 0h
>
> As already discussed on ML, it would be nice to have a service which would periodically write timestamp to a file signalling it is up / running.
> Then, on the startup, we would read this file and we would determine if there is some table which gc grace is behind this time and we would fail the start so we would prevent zombie data to be likely spread around a cluster.
> https://lists.apache.org/thread/w4w5t2hlcrvqhgdwww61hgg58qz13glw



--
This message was sent by Atlassian Jira
(v8.20.7#820007)

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cassandra.apache.org
For additional commands, e-mail: commits-help@cassandra.apache.org