A customer discovered that their WiredTiger file was empty and size zero. The file should contain the WT version that created the database. It appears that a WT bug creates this file at size zero if the file is deleted for some reason.
If the WiredTiger file isn't present and WT is started with the "create" config option (i.e., create the database if it doesn't exist), then WT will recreate the WiredTiger file, but leave it at size zero.
There are several different ways WT could handle this scenario, but it shouldn't silently create a file with the wrong contents. Three plausible options are:
- Silently recreate the file with valid contents
- Log an error and recreate the file as in #1
- Report and error and fail
I think #2 or #3 would be the right option. That file shouldn't get deleted; there isn't code in WT that would delete it. So if it's disappeared there could be other issues and this should be reported to the user.