From 3c5eed5ebee8eb06425e8716e1a56fb9782ce9a9 Mon Sep 17 00:00:00 2001 From: Zhongyi Xie Date: Mon, 25 Mar 2019 23:22:14 -0700 Subject: [PATCH] remove incorrect assert in `GetUniqueIdFromFile` (#5102) Summary: User report has shown that sometimes `BlockBasedTable::SetupCacheKeyPrefix` would assert when trying to generate an id from the file. The actual cause seems to be hardware related but we might be better off without the incorrect assertion See T42178927 for more information Pull Request resolved: https://github.com/facebook/rocksdb/pull/5102 Differential Revision: D14604677 Pulled By: miasantreble fbshipit-source-id: fcb09207ebdc4fa66e941afbc0523d84797e7ad7 --- env/io_posix.cc | 1 - 1 file changed, 1 deletion(-) diff --git a/env/io_posix.cc b/env/io_posix.cc index de796c653..628ed8413 100644 --- a/env/io_posix.cc +++ b/env/io_posix.cc @@ -265,7 +265,6 @@ size_t PosixHelper::GetUniqueIdFromFile(int fd, char* id, size_t max_size) { struct stat buf; int result = fstat(fd, &buf); - assert(result != -1); if (result == -1) { return 0; }