smiklosovic commented on a change in pull request #1046:
URL: https://github.com/apache/cassandra/pull/1046#discussion_r647778704



##########
File path: src/java/org/apache/cassandra/tools/nodetool/Snapshot.java
##########
@@ -63,6 +67,13 @@ public void execute(NodeProbe probe)
 
             Map<String, String> options = new HashMap<String,String>();
             options.put("skipFlush", Boolean.toString(skipFlush));
+            if (null != ttl) {
+                Duration d = Duration.from(ttl);
+                // ttl for snapshot must be at least 1 minute
+                if (d.getMonths() == 0 && d.getDays() == 0 && 
d.getNanoseconds() < d.NANOS_PER_MINUTE)

Review comment:
       I think this is just enough:
   
           if (ttl.toMinutes() < 1)
               throw  ...




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to