Archive 002 producing errors on restart
adrianlzt opened this issue · comments
Using a elasticsearch as backend, with index_entries_limit: 10
.
If we create 8 nodes and then update all of them we will have 8 docs in live index and 8 in archive 001.
Now we update again the 8 nodes, now we have 16 docs in archive 001.
When the roll index kick in, it will generate the archive 002 and point the archive alias to that 002 index.
If we restart skydive at this point, it will consider archive 002 as an old index (3f7102d) and move the alias back to archive 001.
This is already a problem, but also, ni the next roll index, it will try to create again archive 002, failing because it already exists.
I want to understand why the commit 3f7102d remove old indices before trying to fix it (because the fix looks like its almost reverting that commit).
Hello, I can't find the commit you specified
Uops, I copied the bad string
@adrianlzt It seems that the commit tried to fix this problem : #2334
Maybe the fix could be to simply change if previousIndex != indexName {
to if !strings.HasPrefix(previousIndex, c.Config.IndexPrefix+i.Name + "_v" + schemaVersion {