RocketChat / RocketChat/Rocket.Chat

Retention policy does not delete old messages

Open
#27,415 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

Description

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:

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the global retention-policy behavior with a 90-day threshold and a one-hour pruning timer, using the server and deployment details in the report. Trace the retention and pruning paths to identify why messages remain in channels, then verify that messages older than the configured age are removed and add or update regression coverage if the relevant test area is found.

Written by the indexing model from the issue text.

Assessment

Tech stack
mongodb, node.js, typescript
Domain
backend, databases
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.