Gcache files deletion

We have a 3 node galera cluster with mariadb server version

mariadb-server 1:10.11.2+maria~ubu2004 amd64 MariaDB database server binaries

The wsrep version is 26.4.14 , wsrep_provider_name is galera. We are observing lot of gcache files from 4 months ago . can we safely delete those old files ? if so, how much older files can be deleted ? The wsrep_local_state_comment is showing as synced

Those should be auto-purging. What do you have configured for wsrep_provider_options? Do you have gcache.freeze_purge_at_seqno enabled?

Is it a config option for galera ? Also we have files from last 4 months. can we delete those ? what is the test to decide which onces to delete

Yes, config option in wsrep_provider_options. The test is looking at the last sequence number and if the current seqno is above that, you can delete.

one thing to understand..

so i have a long list of 10k gcache.page files in the /var/lib/mysql folder. how to compare the last seq no with the current one and decide which gcache files have to be deleted ? Please clarify this.

The seq no in grastate.dat is -1 .

Yes, this is always the case when PXC is running. On shutdown, the value will be updated.

You still have not confirmed your settings. If the settings are wrong, then when corrected, the gcache files will auto-purge.

You can simply stop nodeX, erase all gcache files, then start nodeX back up. This will not cause loss of data. The cache files will start generating again. Repeat for nodeY, then nodeZ.

this is our config

wsrep_provider_options = "gcache.size = 1024M; gmcast.listen_addr = tcp://