[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-24 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

I've built it once again, I have added tests for invalid property values as 
well.

PR: https://github.com/apache/cassandra/pull/2020/files
j8 pre-commit 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/1612/workflows/d6511e26-523e-47f4-8308-5ca2d30a51a1
j11 pre-commit 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/1612/workflows/e8849b5e-2a58-4052-a1f5-03d3e23c0315

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-22 Thread Branimir Lambov (Jira)


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

Branimir Lambov commented on CASSANDRA-18044:
-

+1, the code looks good to me.

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-22 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

Thanks [~blambov] for the review.

I have changed the logging a little bit and I added one more combination of 
these properties for tests

pr: https://github.com/apache/cassandra/pull/2020/files
j11 pre-commit 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/1599/workflows/fdca736a-2327-4f73-b1b5-99bd5398ca06
j8 pre-commit 
https://app.circleci.com/pipelines/github/instaclustr/cassandra/1599/workflows/d8f218bf-0b3b-4fdb-8f7c-4133804d0bec

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 1h 10m
>  Remaining Estimate: 0h
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-21 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

maybe [~ycai] or [~blambov] would have 10 minutes to take a look at this?

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-16 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

[~jmckenzie] it would be great if you took a look. 

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Assignee: Stefan Miklosovic
>Priority: Normal
> Fix For: 4.x
>
>  Time Spent: 0.5h
>  Remaining Estimate: 0h
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-15 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

I prefer *ks1.tb1,ks2.tb2* for tables and *ks1,ks2,ks3* for keyspaces and this 
might be mixed like {*}ks1.tb1,ks2{*}.

*ks1.** is an interesting idea but I think that the asterisk is redundant 
there, afaik I dont think we use the same format anywhere else in Cassandra.

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Priority: Normal
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-15 Thread Josh McKenzie (Jira)


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

Josh McKenzie commented on CASSANDRA-18044:
---

bq. What if an operator just wants to do PITR for one keyspace and not the rest?
Gotcha. Thanks; was being dense.

I don't see any reason why having a param variant that takes a keyspace name 
and enumerates tables in the ReplayFilter rather than just taking a list of 
tables would be a problem. Looks like the ReplayFilter is currently expecting 
{{cassandra.replayList=ks.table,ks.table2,ks.table3,ks2.table1}} format, so 
supporting a variant with just a keyspace name, or perhaps something like 
{{cassandra.replayList=ks.*}} could integrated and extend the existing format 
w/out too much trouble?

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Priority: Normal
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-15 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

Rewording the problem here, if an operator wants to do a point-in-time 
restoration for one keyspace, he needs to enumerate all tables. When we have a 
possibility to replay specific tables only, why would not we extend this logic 
to all tables in a keyspace? What if an operator just wants to do PITR for one 
keyspace and not the rest? 

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Priority: Normal
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-15 Thread Josh McKenzie (Jira)


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

Josh McKenzie commented on CASSANDRA-18044:
---

bq. However, imagine you have a keyspace of 50 tables and other keyspace of 20 
tables and you want to replay only all tables of the first keyspace.
When would this kind of thing come up from an operational perspective?

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Priority: Normal
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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



[jira] [Commented] (CASSANDRA-18044) Make CommitLogReplayer replay all tables in a keyspace when only keyspace is specified in cassandra.replayList property

2022-11-15 Thread Stefan Miklosovic (Jira)


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

Stefan Miklosovic commented on CASSANDRA-18044:
---

pinging people based on git history for commit logs subsystem to triage this 
ticket if it all makes sense to them [~jmckenzie] [~yifanc]  [~blambov]

> Make CommitLogReplayer replay all tables in a keyspace when only keyspace is 
> specified in cassandra.replayList property
> ---
>
> Key: CASSANDRA-18044
> URL: https://issues.apache.org/jira/browse/CASSANDRA-18044
> Project: Cassandra
>  Issue Type: Improvement
>  Components: Local/Commit Log
>Reporter: Stefan Miklosovic
>Priority: Normal
>
> CommitLogReplayer reacts on a property "cassandra.replayList" (1) which 
> replays only some tables if needed upon commit log replay.
> However, imagine you have a keyspace of 50 tables and other keyspace of 20 
> tables and you want to replay only all tables of the first keyspace.
> Currently, an operator has to enumerate all 50 tables which is not desirable 
> and it is error prone.
> I suggest to change the logic in such a way that if there is only keyspace 
> listed, we would retrieve all its tables dynamically in runtime and replayed 
> only these.
> The solution would be receptive to both keyspace.table as well as only 
> "keyspace" format.
> Valid examples of such property:
> ks1,ks2,ks3.tb1 // it will retrieve all tables of ks1 and ks2 and appends 
> ks3.tb1
> ks1.tb1,ks2.tb2
> ks1,ks2,ks3 // it will retrieve tables of all these keyspaces
> [https://github.com/apache/cassandra/blob/trunk/src/java/org/apache/cassandra/db/commitlog/CommitLogReplayer.java#L379-L387]



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

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