-
Recently whilst changing indexes in our code I came across a wholly unhelpful exception when an error occurs in the creation of an index. Tracking the down the root cause of this leads me to the usage of IndexCreation.CreateIndexes. The exception that we get, when we have an index with an error is the following: This exception occurs regardless of which index is errored, and happens in the same index every single time. Changing the usage of IndexCreation.CreateIndex to store.ExectuteIndexes results in the following exception: As you can imagine, the second case is vastly more helpful. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
I've created an issue, in both cases you should get a meaningful exception. You can track it here: https://issues.hibernatingrhinos.com/issue/RavenDB-24077 The difference is that |
Beta Was this translation helpful? Give feedback.
I've created an issue, in both cases you should get a meaningful exception. You can track it here: https://issues.hibernatingrhinos.com/issue/RavenDB-24077
The difference is that
IndexCreation.CreateIndexes
on failure will process indexes one by one, andDocumentStore.ExecuteIndexes
will just fail (there is a batching mechanism inside the endpoint it hits - 50 indexes)