diff --git a/conanfile.py b/conanfile.py index cfff42b6c..5be3f5a50 100644 --- a/conanfile.py +++ b/conanfile.py @@ -5,7 +5,7 @@ class HomestoreConan(ConanFile): name = "homestore" - version = "6.4.7" + version = "6.4.6" homepage = "https://github.com/eBay/Homestore" description = "HomeStore Storage Engine" diff --git a/src/lib/device/virtual_dev.cpp b/src/lib/device/virtual_dev.cpp index c2326fa32..c653d470a 100644 --- a/src/lib/device/virtual_dev.cpp +++ b/src/lib/device/virtual_dev.cpp @@ -51,24 +51,6 @@ SISL_LOGGING_DECL(device) namespace homestore { -#ifdef _PRERELEASE -#define SYNC_FLIP_INJECTION(IO_TYPE) \ - if (iomgr_flip::instance()->test_flip("IO_TYPE_failure")) { return std::make_error_code(std::errc::io_error); } \ - if (iomgr_flip::instance()->test_flip("IO_TYPE_stuck")) { \ - std::this_thread::sleep_for(std::chrono::hours(24 * 365 * 100)); /* Sleep for 100 years */ \ - return std::make_error_code(std::errc::resource_unavailable_try_again); \ - } - -#define ASYNC_FLIP_INJECTION(IO_TYPE) \ - if (iomgr_flip::instance()->test_flip("IO_TYPE_failure")) { \ - return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::io_error)); \ - } \ - if (iomgr_flip::instance()->test_flip("IO_TYPE_stuck")) { \ - std::this_thread::sleep_for(std::chrono::hours(24 * 365 * 100)); /* Sleep for 100 years */ \ - return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::resource_unavailable_try_again)); \ - } -#endif - static std::shared_ptr< BlkAllocator > create_blk_allocator(blk_allocator_type_t btype, uint32_t vblock_size, uint32_t ppage_sz, uint32_t align_sz, uint64_t size, bool is_auto_recovery, uint32_t unique_id, bool is_init) { @@ -334,10 +316,6 @@ folly::Future< std::error_code > VirtualDev::async_write(const char* buf, uint32 bool part_of_batch) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "async_write needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - ASYNC_FLIP_INJECTION(blk_write) -#endif - Chunk* chunk; uint64_t const dev_offset = to_dev_offset(bid, &chunk); if (sisl_unlikely(dev_offset == INVALID_DEV_OFFSET)) { @@ -356,10 +334,6 @@ folly::Future< std::error_code > VirtualDev::async_write(const char* buf, uint32 folly::Future< std::error_code > VirtualDev::async_write(const char* buf, uint32_t size, cshared< Chunk >& chunk, uint64_t offset_in_chunk) { -#ifdef _PRERELEASE - ASYNC_FLIP_INJECTION(blk_write) -#endif - if (sisl_unlikely(!is_chunk_available(chunk))) { return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::resource_unavailable_try_again)); } @@ -378,10 +352,6 @@ folly::Future< std::error_code > VirtualDev::async_writev(const iovec* iov, cons bool part_of_batch) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "async_writev needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - ASYNC_FLIP_INJECTION(blk_write) -#endif - Chunk* chunk; uint64_t const dev_offset = to_dev_offset(bid, &chunk); if (sisl_unlikely(dev_offset == INVALID_DEV_OFFSET)) { @@ -400,9 +370,6 @@ folly::Future< std::error_code > VirtualDev::async_writev(const iovec* iov, cons folly::Future< std::error_code > VirtualDev::async_writev(const iovec* iov, const int iovcnt, cshared< Chunk >& chunk, uint64_t offset_in_chunk) { -#ifdef _PRERELEASE - ASYNC_FLIP_INJECTION(blk_write) -#endif if (sisl_unlikely(!is_chunk_available(chunk))) { return folly::makeFuture< std::error_code >(std::make_error_code(std::errc::resource_unavailable_try_again)); } @@ -421,9 +388,7 @@ folly::Future< std::error_code > VirtualDev::async_writev(const iovec* iov, cons ////////////////////////// sync write section ////////////////////////////////// std::error_code VirtualDev::sync_write(const char* buf, uint32_t size, BlkId const& bid) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "sync_write needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_write) -#endif + Chunk* chunk; uint64_t const dev_offset = to_dev_offset(bid, &chunk); if (sisl_unlikely(dev_offset == INVALID_DEV_OFFSET)) { @@ -434,9 +399,6 @@ std::error_code VirtualDev::sync_write(const char* buf, uint32_t size, BlkId con std::error_code VirtualDev::sync_write(const char* buf, uint32_t size, cshared< Chunk >& chunk, uint64_t offset_in_chunk) { -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_write) -#endif if (sisl_unlikely(!is_chunk_available(chunk))) { return std::make_error_code(std::errc::resource_unavailable_try_again); } @@ -445,9 +407,7 @@ std::error_code VirtualDev::sync_write(const char* buf, uint32_t size, cshared< std::error_code VirtualDev::sync_writev(const iovec* iov, int iovcnt, BlkId const& bid) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "sync_writev needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_write) -#endif + Chunk* chunk; uint64_t const dev_offset = to_dev_offset(bid, &chunk); if (sisl_unlikely(dev_offset == INVALID_DEV_OFFSET)) { @@ -466,9 +426,6 @@ std::error_code VirtualDev::sync_writev(const iovec* iov, int iovcnt, BlkId cons std::error_code VirtualDev::sync_writev(const iovec* iov, int iovcnt, cshared< Chunk >& chunk, uint64_t offset_in_chunk) { -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_write) -#endif if (sisl_unlikely(!is_chunk_available(chunk))) { return std::make_error_code(std::errc::resource_unavailable_try_again); } @@ -490,9 +447,6 @@ std::error_code VirtualDev::sync_writev(const iovec* iov, int iovcnt, cshared< C folly::Future< std::error_code > VirtualDev::async_read(char* buf, uint64_t size, BlkId const& bid, bool part_of_batch) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "async_read needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - ASYNC_FLIP_INJECTION(blk_read) -#endif Chunk* pchunk; uint64_t const dev_offset = to_dev_offset(bid, &pchunk); @@ -505,9 +459,6 @@ folly::Future< std::error_code > VirtualDev::async_read(char* buf, uint64_t size folly::Future< std::error_code > VirtualDev::async_readv(iovec* iovs, int iovcnt, uint64_t size, BlkId const& bid, bool part_of_batch) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "async_readv needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - ASYNC_FLIP_INJECTION(blk_read) -#endif Chunk* pchunk; uint64_t const dev_offset = to_dev_offset(bid, &pchunk); @@ -520,9 +471,6 @@ folly::Future< std::error_code > VirtualDev::async_readv(iovec* iovs, int iovcnt ////////////////////////////////////////// sync read section //////////////////////////////////////////// std::error_code VirtualDev::sync_read(char* buf, uint32_t size, BlkId const& bid) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "sync_read needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_read) -#endif Chunk* chunk; uint64_t const dev_offset = to_dev_offset(bid, &chunk); @@ -533,9 +481,6 @@ std::error_code VirtualDev::sync_read(char* buf, uint32_t size, BlkId const& bid } std::error_code VirtualDev::sync_read(char* buf, uint32_t size, cshared< Chunk >& chunk, uint64_t offset_in_chunk) { -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_read) -#endif if (sisl_unlikely(!is_chunk_available(chunk))) { return std::make_error_code(std::errc::resource_unavailable_try_again); } @@ -544,9 +489,6 @@ std::error_code VirtualDev::sync_read(char* buf, uint32_t size, cshared< Chunk > std::error_code VirtualDev::sync_readv(iovec* iov, int iovcnt, BlkId const& bid) { HS_DBG_ASSERT_EQ(bid.is_multi(), false, "sync_readv needs individual pieces of blkid - not MultiBlkid"); -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_read) -#endif Chunk* chunk; uint64_t const dev_offset = to_dev_offset(bid, &chunk); @@ -565,9 +507,6 @@ std::error_code VirtualDev::sync_readv(iovec* iov, int iovcnt, BlkId const& bid) } std::error_code VirtualDev::sync_readv(iovec* iov, int iovcnt, cshared< Chunk >& chunk, uint64_t offset_in_chunk) { -#ifdef _PRERELEASE - SYNC_FLIP_INJECTION(blk_read) -#endif if (sisl_unlikely(!is_chunk_available(chunk))) { return std::make_error_code(std::errc::resource_unavailable_try_again); }