Can't delete index (3.5 RC 3)

86 views
Skip to first unread message

Johan

unread,
Oct 13, 2016, 7:51:03 PM10/13/16
to RavenDB - 2nd generation document database
I am having a problem with an incorrect index definition which I can't seem to remove.
I migrated to 3.5 and one of my indexes has an incorrect definition. For some reason the index used to work, though it truly has an unterminated string constant in the definition.

When I start 3.5 I get a message about this.
Index '32-(MyIndex)' removed because it is not found or invalid

I correct my index definition and perform PutIndex with the overwrite option set to true. This creates the correct index.
I clear my alerts on the DB and restart the DB.
I get the same error message that index 32 is incorrect and removed. I do however have my newly created index (with the same name), but this now has a different index ID.

How do I get rid of this incorrect index definition?
Or how should I have corrected this index definition as it seems to have created a new definition instead of overwriting the existing one.

- Johan

Oren Eini (Ayende Rahien)

unread,
Oct 14, 2016, 1:00:47 AM10/14/16
to ravendb
Can you check the IndexDefinitions folder? Do you have 32 there?

Hibernating Rhinos Ltd  

Oren Eini l CEO Mobile: + 972-52-548-6969

Office: +972-4-622-7811 l Fax: +972-153-4-622-7811

 


--
You received this message because you are subscribed to the Google Groups "RavenDB - 2nd generation document database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Johan

unread,
Oct 14, 2016, 1:32:04 AM10/14/16
to RavenDB - 2nd generation document database
Yes the IndexDefinition folder has a definition for index 32. It is the original definition with the error in there.
The Index folder also has a subfolder 32.
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+u...@googlegroups.com.

Johan

unread,
Oct 14, 2016, 12:22:43 PM10/14/16
to RavenDB - 2nd generation document database
Turns out the database I sent as part of RavenDB-5160 should have this issue as well. In this test DB it is index 29 that has the problem (same index). I can send you a test case if needed as well.
I am fine that it removes the index (as it is incorrect), as long as it truly deletes it.

Oren Eini (Ayende Rahien)

unread,
Oct 18, 2016, 3:35:53 PM10/18/16
to ravendb
Yes, this is by design, if for some reason we can't create the index, we will avoid doing so, but we'll not delete the index.
Typically, index init failure after it is created is because you are missing an analyzer, and it is expected the admin will correct it
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Johan

unread,
Oct 18, 2016, 6:06:37 PM10/18/16
to RavenDB - 2nd generation document database
Ok, but how do I correct it.
I correct my index definition and perform PutIndex with the overwrite option set to true. This creates a new correct index, but it still didn't delete the old incorrect index. Everything is working, but I always get this error about this old index.

Oren Eini (Ayende Rahien)

unread,
Oct 20, 2016, 3:20:43 AM10/20/16
to ravendb
Manually go to the directory and delete the old index directory
To unsubscribe from this group and stop receiving emails from it, send an email to ravendb+unsubscribe@googlegroups.com.

Johan

unread,
Oct 20, 2016, 12:45:19 PM10/20/16
to RavenDB - 2nd generation document database
Even removing the .index file from the IndexDefinitions and the index folder from Indexes doesn't clear the error in I see in the alerts (I delete all alerts, save, then restart the db and the alert is back with the starting time of the new start of the db).

The error message has changed slightly.
Index '32-(Unknown Name)' removed because it is not found or invalid

Before the removal of the .index file it still knew the name of the index in question, but now it mentions "Unknown Name".

Deleting the index from my old data directory before the migration does seem to get rid of this.

ar...@ayende.com

unread,
Oct 21, 2016, 5:28:50 AM10/21/16
to RavenDB - 2nd generation document database
Hi Johan,

we have found the issue and fixed it (http://issues.hibernatingrhinos.com/issue/RavenDB-5491). Thanks for the report.

Regards,
Arek

Johan

unread,
Oct 21, 2016, 12:54:39 PM10/21/16
to RavenDB - 2nd generation document database
Awesome!
Thanks,
Johan
Reply all
Reply to author
Forward
0 new messages