Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class HomeBlocksConan(ConanFile):
name = "homeblocks"
version = "4.0.1"
version = "4.0.2"

homepage = "https://github.com/eBay/HomeBlocks"
description = "Block Store built on HomeStore"
Expand Down Expand Up @@ -46,7 +46,8 @@ def build_requirements(self):
self.test_requires("gtest/1.17.0")

def requirements(self):
self.requires("homestore/[^7.0]@oss/master", transitive_headers=True)
#self.requires("homestore/[^7.0]@oss/master", transitive_headers=True)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I will fix this after HomeStore PR is merged

self.requires("homestore/7.0.1", transitive_headers=True)
self.requires("iomgr/[^12.0]@oss/master", transitive_headers=True)
self.requires("sisl/[^13.0]@oss/master", transitive_headers=True)

Expand Down
1 change: 1 addition & 0 deletions src/lib/homeblks_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,7 @@ void HomeBlocksImpl::on_hb_meta_blk_found(sisl::byte_view const& buf, void* cook
if (sb_->test_flag(SB_FLAGS_GRACEFUL_SHUTDOWN)) {
// if it is a gracefuln shutdown, this flag should be set again in shutdown routine;
sb_->clear_flag(SB_FLAGS_GRACEFUL_SHUTDOWN);
gracefully_shutdown_ = true;
LOGI("System was shutdown gracefully");
} else if (sb_->test_flag(SB_FLAGS_RESTRICTED)) {
is_restricted_.store(true);
Expand Down
2 changes: 2 additions & 0 deletions src/lib/homeblks_impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ class HomeBlocksImpl : public HomeBlocks, public VolumeManager, public std::enab
std::unordered_map< std::string, shared< VolumeIndexTable > > idx_tbl_map_;

bool recovery_done_{false};
bool gracefully_shutdown_{false};
std::mutex sb_lock_; // this lock is only used when FC is triggered;
superblk< homeblks_sb_t > sb_;
peer_id_t our_uuid_;
Expand Down Expand Up @@ -161,6 +162,7 @@ class HomeBlocksImpl : public HomeBlocks, public VolumeManager, public std::enab
void exit_fc(VolumePtr& vol);
bool is_restricted() const { return is_restricted_.load(); }
hs_chunk_size_cfg_t get_chunk_size() const;
bool is_graceful_shutdown() const { return gracefully_shutdown_; }

public:
// public static APIs;
Expand Down
6 changes: 6 additions & 0 deletions src/lib/volume_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,12 @@ void HomeBlocksImpl::submit_io_batch() { homestore::data_service().submit_io_bat
void HomeBlocksImpl::on_write(int64_t lsn, const sisl::blob& header, const sisl::blob& key,
const std::vector< homestore::MultiBlkId >& new_blkids,
cintrusive< homestore::repl_req_ctx >& ctx) {

// We are not expecting log reply for a graceful restart;
// if we are in recovery path, we must be recovering from a crash.
DEBUG_ASSERT(ctx != nullptr || !is_graceful_shutdown(),
"repl ctx is null (recovery path) in graceful shutdown scenario, this is not expected!");

repl_result_ctx< VolumeManager::NullResult >* repl_ctx{nullptr};
if (ctx) { repl_ctx = boost::static_pointer_cast< repl_result_ctx< VolumeManager::NullResult > >(ctx).get(); }
auto msg_header = r_cast< MsgHeader* >(const_cast< uint8_t* >(header.cbytes()));
Expand Down
Loading