bfs : 1397 : Name in use.
|Reported by:||bga||Owned by:||axeld|
These seem to be harmless messages that show on syslog but I guess I manage to track it to what I think is a bug (completely by chance, as I was investigating bug #2614.
All the times I am getting this message it is happening when writting the last_modified attribute to files. The reason it does that is because it seems this index does not allow duplicates. This is kinda weird because I see no reason for it not to accept duplicates (a duplicate here is 2 files with the same modification date, which can happen (and, in fact, does) all the time. So I went to check how this is set and I noticed it uses the following code in BPlusTree.cpp to figure if the index allows duplicates or not:
BPlusTree.cpp : BPlusTree::SetTo().
fAllowDuplicates = ((stream->Mode() & S_INDEX_DIR) == S_INDEX_DIR && stream->BlockRun() != stream->Parent()) || (stream->Mode() & S_ALLOW_DUPS) != 0;
fAllowDuplicates is initialized by default as being true and is only changed when SetTo() is called. S_ALLOW_DUPS is not set anywhere in the BFS code, stream->Mode() must have S_INDEX_DIR set (either this or the bug is in this point) so it seems the problem is the stream->BlockRun() != stream->Parent() check. What is its intent exactly? And why does it seem it has a different behaviour for last_modified when compared to the behavious in, say, size or name indexes?