Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 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 = "5.0.3"
version = "5.0.4"

homepage = "https://github.com/eBay/HomeBlocks"
description = "Block Store built on HomeStore"
Expand Down Expand Up @@ -46,7 +46,7 @@ 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.1]@oss/master", 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
3 changes: 3 additions & 0 deletions src/lib/listener.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,9 @@ class HBListener : public homestore::ReplDevListener {
void on_complete_replace_member(const std::string& task_id, const homestore::replica_member_info& member_out,
const homestore::replica_member_info& member_in,
homestore::trace_id_t tid) override {}
void on_clean_replace_member_task(const std::string& task_id, const homestore::replica_member_info& member_out,
const homestore::replica_member_info& member_in,
homestore::trace_id_t tid) override {}
void on_remove_member(const homestore::replica_id_t&, homestore::trace_id_t) override {}
void on_rollback(int64_t lsn, const sisl::blob& header, const sisl::blob& key,
cintrusive< homestore::repl_req_ctx >& ctx) override {}
Expand Down
2 changes: 1 addition & 1 deletion src/lib/volume/tests/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ target_link_libraries(test_volume_chunk_selector
)

add_test(NAME VolumeTest COMMAND test_volume --gc_timer_nsecs=3 --index_chunk_size_mb=128 --data_chunk_size_mb=128)
add_test(NAME VolumeIOTest COMMAND test_volume_io --index_chunk_size_mb=128 --data_chunk_size_mb=128 --gtest_filter=-VolumeIOTest.LongRunningRandomIO:VolumeIOTest.WriteCrash:VolumeIOTest.IndexPutFailure) # FIXME: turn on after io issue is fixed;
add_test(NAME VolumeIOTest COMMAND test_volume_io --index_chunk_size_mb=128 --data_chunk_size_mb=128)
add_test(NAME VolumeChunkSelectorTest COMMAND test_volume_chunk_selector)
1 change: 1 addition & 0 deletions src/lib/volume/volume.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,7 @@ VolumeManager::NullAsyncResult Volume::write(const vol_interface_req_ptr& vol_re
lba_t start_lba = vol_req->lba;
for (auto& blkid : new_blkids) {
DEBUG_ASSERT_EQ(blkid.num_pieces(), 1, "Multiple blkid pieces");
LOGT("volume write blkid={} lba={}", blkid.to_integer(), start_lba);

// Split the large blkid to individual blkid having only one block because each LBA points
// to a blkid containing single blk which is stored in index value. Calculate the checksum for each
Expand Down
15 changes: 12 additions & 3 deletions src/lib/volume_mgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -363,11 +363,20 @@ void HomeBlocksImpl::on_write(int64_t lsn, const sisl::blob& header, const sisl:
}

// Free all the old blkids. This happens for both normal writes
// and crash recovery.
// and crash recovery. During recovery we also if it has been alloced,
// because we could have stale log entries which have old blkid's
// which may be already freed.
for (uint32_t i = 0; i < journal_entry->num_old_blks; i++) {
BlkId old_blkid = *r_cast< const BlkId* >(key_buffer);
LOGT("on_write free blk {}", old_blkid);
vol_ptr->rd()->async_free_blks(lsn, old_blkid);
if (repl_ctx == nullptr) {
if (homestore::hs()->data_service().is_blk_alloced(old_blkid)) {
LOGT("on_write free blk {} start_lba {}", old_blkid, journal_entry->start_lba);
homestore::hs()->data_service().free_blk_now(old_blkid);
}
} else {
LOGT("on_write free blk {} start_lba {}", old_blkid, journal_entry->start_lba);
homestore::hs()->data_service().free_blk_now(old_blkid);
}
key_buffer += sizeof(BlkId);
}

Expand Down
Loading