@@ -95,7 +95,8 @@ static void CreateIndexes(MongoPersistenceProvider instance)
9595 instance . WorkflowInstances . Indexes . CreateOne ( new CreateIndexModel < WorkflowInstance > (
9696 Builders < WorkflowInstance > . IndexKeys
9797 . Ascending ( x => x . NextExecution )
98- . Ascending ( x => x . Status ) ,
98+ . Ascending ( x => x . Status )
99+ . Ascending ( x => x . Id ) ,
99100 new CreateIndexOptions { Background = true , Name = "idx_nextExec_v2" } ) ) ;
100101
101102 instance . Events . Indexes . CreateOne ( new CreateIndexModel < Event > (
@@ -111,17 +112,9 @@ static void CreateIndexes(MongoPersistenceProvider instance)
111112
112113 instance . EventSubscriptions . Indexes . CreateOne ( new CreateIndexModel < EventSubscription > (
113114 Builders < EventSubscription > . IndexKeys
114- . Ascending ( x => x . EventKey )
115- . Ascending ( x => x . EventName ) ,
116- new CreateIndexOptions { Background = true , Name = "idx_namekey_v2" } ) ) ;
117-
118- instance . EventSubscriptions . Indexes . CreateOne ( new CreateIndexModel < EventSubscription > (
119- Builders < EventSubscription > . IndexKeys . Ascending ( x => x . SubscribeAsOf ) ,
120- new CreateIndexOptions { Background = true , Name = "idx_subscribe" } ) ) ;
121-
122- instance . EventSubscriptions . Indexes . CreateOne ( new CreateIndexModel < EventSubscription > (
123- Builders < EventSubscription > . IndexKeys . Ascending ( x => x . ExternalToken ) ,
124- new CreateIndexOptions { Background = true , Name = "idx_token" } ) ) ;
115+ . Ascending ( x => x . EventName )
116+ . Ascending ( x => x . EventKey ) ,
117+ new CreateIndexOptions { Background = true , Name = "idx_namekey" } ) ) ;
125118
126119 instance . ScheduledCommands . Indexes . CreateOne ( new CreateIndexModel < ScheduledCommand > (
127120 Builders < ScheduledCommand > . IndexKeys
0 commit comments