RocketChat / RocketChat/Rocket.Chat
Retention policy does not delete old messages
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:
- Apply global retention policy for prunning messages after 90 days
- Fixe the pruning timer to 1 hour
- 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
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- 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