When the efile port cached in the process dictionary dies for any
reason, the code tries to load it one more time. If we can not open a
new port, something is probably seriously wrong, so we stop.
This fixes the issue with efile ports going away, then Bitcask basically
getting stuck on the list_dir operation needed when opening a cask, which
relies on this port to avoid serializing through the file_server.
The bitcask:efile_error_test/0 added in the first commit will fail, and pass in
the second commit.
When the efile port cached in the process dictionary dies for any reason, the code tries to load it one more time. If we can not open a new port, something is probably seriously wrong, so we stop.
This fixes the issue with efile ports going away, then Bitcask basically getting stuck on the list_dir operation needed when opening a cask, which relies on this port to avoid serializing through the file_server.
The bitcask:efile_error_test/0 added in the first commit will fail, and pass in the second commit.
This fixes https://github.com/basho/bitcask/issues/188