RavenDB 4 RC2:无法为数据库执行PutAutoIndexCommand类型的命令 - 无法更新自动索引:

时间:2017-11-28 08:53:25

标签: indexing ravendb ravendb-studio ravendb4

我正在使用RavenDB 4 RC 2数据库。我的一些数据库自动生成的索引保持“冻结”状态。并导致我的API出错。删除冻结索引提供了短期解决方案。但即使我正在重新生成它们,它们只是时间问题而且它们会冻结'试。

FYI =>它们在RavenDb Studio中获得橙色状态,而不是正常的绿色状态颜色。我有测试版和RC1。所以发生这种情况的时间表是几个月。

有谁知道如何解决这个问题?请参阅下面的完整Stacktrace。

Failed to generate order number Raven.Client.Exceptions.Cluster.CommandExecutionException: Cannot execute command of type PutAutoIndexCommand for database <my-database> ---> System.NotSupportedException: Can not update auto-index: Auto/Orders/ByCreatedBy.IdAndOrderNumberAndWorkspace 
at Raven.Client.ServerWide.DatabaseRecord.AddIndex(AutoIndexDefinition definition) in C:\Builds\RavenDB-4.0-RC\src\Raven.Client\ServerWide\DatabaseRecord.cs:line 119 
at Raven.Server.ServerWide.Commands.Indexes.PutAutoIndexCommand.UpdateDatabaseRecord(DatabaseRecord record, Int64 etag) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\ServerWide\Commands\Indexes\PutAutoIndexCommand.cs:line 34 
at Raven.Server.ServerWide.ClusterStateMachine.UpdateDatabase(TransactionOperationContext context, String type, BlittableJsonReaderObject cmd, Int64 index, Leader leader, ServerStore serverStore) in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\ServerWide\ClusterStateMachine.cs:line 802 
--- End of inner exception stack trace --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Rachis.RachisConsensus.<PutAsync>d__92.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Rachis\RachisConsensus.cs:line 589 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.ServerWide.ServerStore.<SendToLeaderAsyncInternal>d__124.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\ServerWide\ServerStore.cs:line 1479 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Documents.Indexes.IndexStore.<CreateIndex>d__23.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Indexes\IndexStore.cs:line 435 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Documents.Queries.Dynamic.DynamicQueryRunner.<MatchIndex>d__7.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Queries\Dynamic\DynamicQueryRunner.cs:line 102 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Documents.Queries.Dynamic.DynamicQueryRunner.<ExecuteQuery>d__3.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Queries\Dynamic\DynamicQueryRunner.cs:line 39 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Documents.Queries.QueryRunner.<ExecuteQuery>d__5.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Queries\QueryRunner.cs:line 53 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Documents.Handlers.QueriesHandler.<Query>d__3.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Handlers\QueriesHandler.cs:line 123 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Documents.Handlers.QueriesHandler.<Post>d__0.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Documents\Handlers\QueriesHandler.cs:line 51 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at Raven.Server.Routing.RequestRouter.<HandlePath>d__5.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\Routing\RequestRouter.cs:line 107 
--- End of stack trace from previous location where exception was thrown --- 
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw() 
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) 
at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult() 
at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult() 
at Raven.Server.RavenServerStartup.<RequestHandler>d__11.MoveNext() in C:\Builds\RavenDB-4.0-RC\src\Raven.Server\RavenServerStartup.cs:line 159. Response: {"Error":"Raven.Client.Exceptions.Cluster.CommandExecutionException: Cannot execute command of type PutAutoIndexCommand for database <my-database> ---> System.NotSupportedException: Can not update auto-index: Auto/Orders/ByCreatedBy.IdAndOrderNumberAndWorkspace\r\n at Raven.Client.ServerWide.DatabaseRecord.AddIndex(AutoIndexDefinition definition) in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Client\\ServerWide\\DatabaseRecord.cs:line 119\r\n at Raven.Server.ServerWide.Commands.Indexes.PutAutoIndexCommand.UpdateDatabaseRecord(DatabaseRecord record, Int64 etag) in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\ServerWide\\Commands\\Indexes\\PutAutoIndexCommand.cs:line 34\r\n at Raven.Server.ServerWide.ClusterStateMachine.UpdateDatabase(TransactionOperationContext context, String type, BlittableJsonReaderObject cmd, Int64 index, Leader leader, ServerStore serverStore) in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\ServerWide\\ClusterStateMachine.cs:line 802\r\n --- End of inner exception stack trace ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Rachis.RachisConsensus.<PutAsync>d__92.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Rachis\\RachisConsensus.cs:line 589\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.ServerWide.ServerStore.<SendToLeaderAsyncInternal>d__124.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\ServerWide\\ServerStore.cs:line 1479\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Documents.Indexes.IndexStore.<CreateIndex>d__23.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Documents\\Indexes\\IndexStore.cs:line 435\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Documents.Queries.Dynamic.DynamicQueryRunner.<MatchIndex>d__7.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Documents\\Queries\\Dynamic\\DynamicQueryRunner.cs:line 102\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Documents.Queries.Dynamic.DynamicQueryRunner.<ExecuteQuery>d__3.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Documents\\Queries\\Dynamic\\DynamicQueryRunner.cs:line 39\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Documents.Queries.QueryRunner.<ExecuteQuery>d__5.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Documents\\Queries\\QueryRunner.cs:line 53\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Documents.Handlers.QueriesHandler.<Query>d__3.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Documents\\Handlers\\QueriesHandler.cs:line 123\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Documents.Handlers.QueriesHandler.<Post>d__0.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Documents\\Handlers\\QueriesHandler.cs:line 51\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at Raven.Server.Routing.RequestRouter.<HandlePath>d__5.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\Routing\\RequestRouter.cs:line 107\r\n--- End of stack trace from previous location where exception was thrown ---\r\n at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()\r\n at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)\r\n at System.Runtime.CompilerServices.TaskAwaiter`1.GetResult()\r\n at System.Runtime.CompilerServices.ValueTaskAwaiter`1.GetResult()\r\n at Raven.Server.RavenServerStartup.<RequestHandler>d__11.MoveNext() in C:\\Builds\\RavenDB-4.0-RC\\src\\Raven.Server\\RavenServerStartup.cs:line 159","Message":"Cannot execute command of type PutAutoIndexCommand for database <my-database>","Type":"Raven.Client.Exceptions.Cluster.CommandExecutionException","Url":"/databases/<my-database>/queries?query-hash=11022226452836968979"}

1 个答案:

答案 0 :(得分:1)

这是在夜间报道并修复的:

issues.hibernatingrhinos.com/issue/RavenDB-7919