I want to truncate one set but before that, I want to make some calculations based on how much data has been deleted, however… output of the command seems to be wrong
Admin+> manage truncate ns fm set feed_3 before 2024-11-01T00:00:00+00:00 iso-8601
You're about to truncate up to 3908786 records from set feed_3 for namespace fm with LUT before 00:00:00.000000 UTC on November 01, 2024
Confirm that you want to proceed by typing x70e85, or cancel by typing anything else.
no
Admin+> manage truncate ns fm set feed_3 before 2024-11-29T00:00:00+00:00 iso-8601
You're about to truncate up to 3908786 records from set feed_3 for namespace fm with LUT before 00:00:00.000000 UTC on November 29, 2024
Confirm that you want to proceed by typing x4b761, or cancel by typing anything else.
Why are number of records the same when there is 1 month difference between the two queries and also I guess it is showing master + replica objects here but even if it does then why show sets command shows 1294879 this many objects and we have replication factor 2 on this namespace. Am I missing something?
The text must be showing the total number of records in the set across all nodes. As the tool wouldn’t be able to guess how many records would be truncated when providing a timestamp (this would require going through every record to check the last update time (LUT) individually) it simply warns about the potential maximum of records that would be truncated (‘up to’) if all records did fall under that provided LUT, but if there are no records with an LUT prior to the provided timestamp, no record would be truncated.
Regarding the discrepancy between the number given when attempting to run truncate vs. the metric, how exactly are you getting the statistic? Is this a 3 node cluster by any chance and the number of object is being shown at the node level vs. the truncate that would sum it up across all nodes in the cluster?
It will help if the output of the command below can be shared:
Admin+> show statistics sets like Node objects set
Admin+> show statistics sets like Node objects set
~test testset Set Statistics (2024-12-03 06:17:53 UTC)~
Node |ip-172-31-3-62.ec2.internal:3000
objects|10
set |testset
Number of rows: 3
~test set2 Set Statistics (2024-12-03 06:17:53 UTC)~
Node |ip-172-31-3-62.ec2.internal:3000
objects|10
set |set2
Number of rows: 3