cassandra-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From benjamin roth <brs...@gmail.com>
Subject Re: TRUNCATE on a disk almost full - possible?
Date Fri, 21 Apr 2017 09:27:12 GMT
Truncate needs no space. It just creates a hard link of all affected
SSTables under the corresponding -SNAPSHOT dir (at least with default
settings) and then removes the SSTables.
Also this operation should be rather fast as it is mostly a file-deletion
process with some metadata updates.

2017-04-21 11:21 GMT+02:00 Kunal Gangakhedkar <kgangakhedkar@gmail.com>:

> Hi all,
>
> We have a CF that's grown too large - it's not getting actively used in
> the app right now.
> The on-disk size of the <ks>.<cf> directory is ~407GB and I have only
> ~40GB free left on the disk.
>
> I understand that if I trigger a TRUNCATE on this CF, cassandra will try
> to take snapshot.
> My question:
> Is the ~40GB enough to safely truncate this table?
>
> I will manually remove the <ks>.<cf> directory once the truncate is
> completed.
>
> Also, while browsing through earlier msgs regarding truncate, I noticed
> that it's possible to get OperationTimedOut
> <http://www.mail-archive.com/user@cassandra.apache.org/msg48958.html>
> exception. Does that stop the truncate operation?
>
> Is there any other safe way to clean up the CF?
>
> Thanks,
> Kunal
>

Mime
View raw message