Skip to content
Snippets Groups Projects
Unverified Commit c7ed3784 authored by Anton Kazarinov's avatar Anton Kazarinov Committed by GitHub
Browse files

[IMPROVE] SlackBridge threads performance improvement (#19338)

parent 2a546959
No related branches found
No related tags found
No related merge requests found
......@@ -22,7 +22,7 @@ export class Messages extends Base {
this.tryEnsureIndex({ pinned: 1 }, { sparse: true });
this.tryEnsureIndex({ snippeted: 1 }, { sparse: true });
this.tryEnsureIndex({ location: '2dsphere' });
this.tryEnsureIndex({ slackBotId: 1, slackTs: 1 }, { sparse: true });
this.tryEnsureIndex({ slackTs: 1, slackBotId: 1 }, { sparse: true });
this.tryEnsureIndex({ unread: 1 }, { sparse: true });
// discussions
......
......@@ -206,4 +206,5 @@ import './v206';
import './v207';
import './v208';
import './v209';
import './v210';
import './xrun';
import { Migrations } from '../../../app/migrations/server';
import { Messages } from '../../../app/models/server';
Migrations.add({
version: 210,
up() {
Messages.tryDropIndex({ slackBotId: 1, slackTs: 1 });
Messages.tryEnsureIndex({ slackTs: 1, slackBotId: 1 }, { sparse: true });
},
});
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment