Rocket.Chat icon indicating copy to clipboard operation
Rocket.Chat copied to clipboard

Retention policy does not delete old messages

Open xavpie opened this issue 3 years ago • 4 comments

Description:

Global retention policy doesn't delete old message after time fixed in the settings

Steps to reproduce:

  1. Apply global retention policy for prunning messages after 90 days
  2. Fixe the pruning timer to 1 hour
  3. Wait and look channel after 90 days

Expected behavior:

all old messages should be deleted

Actual behavior:

All old message (previous to 90 days) are still present in each channel/room

Server Setup Information:

  • Version of Rocket.Chat Server: 5.3.1
  • Operating System: CentOS 7
  • Deployment Method: Docker swarm
  • Number of Running Instances: 12 backends Rocket.Chat
  • DB Replicaset Oplog: enabled
  • NodeJS Version: v14.19.3
  • MongoDB Version: 4.4.18

Client Setup Information

Desktop App or Browser Version: Chrome , Firefox, Desktop:

Additional context

Pruning old messages worked fine in old version of Rocket.Chat and I think since version 4.x.x the purge didn't work

Relevant logs:

xavpie avatar Nov 30 '22 15:11 xavpie

Hi! I checked that global pruning (90 days and once a day schedule) works for the instances we've been running.

The issues with pruning I've noticed are with channel specific pruning timers (under the channel's settings); those do not work at all when global pruning is enabled.

Gummikavalier avatar Dec 01 '22 06:12 Gummikavalier

The issues with pruning I've noticed are with channel specific pruning timers (under the channel's settings); those do not work at all when global pruning is enabled.

I can confirm this issue.

dolohow avatar Dec 02 '22 10:12 dolohow

@Gummikavalier @dolohow Thanks for your answers. I changed the settings for global retention, I put : 90 days -> Every 1 hour.

but no old posts are pruned.

xavpie avatar Dec 05 '22 15:12 xavpie

New update. After change the global retention to 1 day and update the Rockat.Chat version evrething seems work

xavpie avatar Dec 21 '22 08:12 xavpie