core: db.fixExpireAfter: ignore system collection

This commit is contained in:
undefined committed 2025-03-24 19:42:38 +08:00
1 parent 9bdf241142
commit 6009a3cb4c
1 file changed
+2
+2
View File
@@ -74,7 +74,9 @@ export class MongoService extends Service {
public async fixExpireAfter() {
// Sometimes mongo's expireAfterSeconds is not working in non-replica set mode;
const collections = await this.db.listCollections().toArray();
const ignore = ['system.profile', 'system.users', 'system.version', 'system.views'];
for (const c of collections) {
if (ignore.includes(c.name)) continue;
const coll = this.db.collection(c.name);
const indexes = await coll.listIndexes().toArray();
for (const i of indexes) {