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

Paulo Motta edited comment on CASSANDRA-10907 at 1/8/16 9:54 PM:
-----------------------------------------------------------------

Overall looks good but we cannot change the methods from 
{{StorageServiceMBean}} as this is a public interface and might be used by 
other systems.

I propose you add a new method {{takeSnapshot(String tag, Map<String, String> 
options, String... entities)}}, where the {{options}} map may only contain the 
{{skipFlush}} option for the time being, but may be extended in the future with 
more options. The {{entities}} array will contain strings in the format 
ks\[.cf\], meaning take a snapshot of keyspaces and/or specific cfs. In this 
way, we don't need to create a new method in the future if we add a new option. 

You should also add a {{@Deprecated}} annotation to the previous methods and 
javadocs, similar to the {{forceRepairAsync}} deprecation notices. It would be 
nice to unify the implementation of {{takeMultipleTableSnapshot}}, 
{{takeTableSnapshot}}, {{takeSnapshot}} to use the new method 
{{takeSnapshot(String tag, Map<String, String> options, String... entities)}}.


was (Author: pauloricardomg):
Overall looks good but we cannot change the methods from 
{{StorageServiceMBean}} as this is a public interface and might be used by 
other systems.

I propose you add a new method {{takeSnapshot(String tag, Map<String, String> 
options, String... entities)}}, where the {{options}} map may only contain the 
{{skipFlush}} option for the time being, but may be extended in the future with 
more options. The {{entities}} array will contain strings in the format 
ks\[.cf\], meaning take a snapshot of keyspaces and/or specific cfs. In this 
way, we don't need to create a new method in the future if we add a new option. 

You should also add a {{@Deprecated}} annotation to the previous methods and 
javadocs, similar to the {{forceRepairAsync}} deprecation notices. It would be 
nice to unify the implementation of {takeMultipleTableSnapshot}}, 
{{takeTableSnapshot}}, {{takeSnapshot}} to use the new method 
{{takeSnapshot(String tag, Map<String, String> options, String... entities)}}.

> Nodetool snapshot should provide an option to skip flushing
> -----------------------------------------------------------
>
>                 Key: CASSANDRA-10907
>                 URL: https://issues.apache.org/jira/browse/CASSANDRA-10907
>             Project: Cassandra
>          Issue Type: Improvement
>          Components: Configuration
>         Environment: PROD
>            Reporter: Anubhav Kale
>            Priority: Minor
>              Labels: lhf
>         Attachments: 0001-flush.patch
>
>
> For some practical scenarios, it doesn't matter if the data is flushed to 
> disk before taking a snapshot. However, it's better to save some flushing 
> time to make snapshot process quick.
> As such, it will be a good idea to provide this option to snapshot command. 
> The wiring from nodetool to MBean to VerbHandler should be easy. 
> I can provide a patch if this makes sense.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to