Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
186 commits
Select commit Hold shift + click to select a range
e76afe5
Add support for raft repl dev replace member. (#546)
sanebay Sep 25, 2024
af56137
Generalize and introduce Sealer into CP.
xiaoxichen Sep 22, 2024
81a80f2
Start data service after log replay done.
xiaoxichen Sep 27, 2024
d445658
Flushing log after data written.
xiaoxichen Sep 29, 2024
15741a8
Workaround: temporary disbale assert of dirty_buf_cnt.
xiaoxichen Sep 30, 2024
b5a9191
Merge pull request #557 from xiaoxichen/fix_cp
raakella1 Oct 1, 2024
5e6bf9d
Add raft commit quorum for replace member if two members down. (#559)
sanebay Oct 2, 2024
87963c3
Add cert watcher
yuwmao Oct 15, 2024
d35f75e
upgrade version
yuwmao Oct 15, 2024
f88317d
fix nit
yuwmao Oct 16, 2024
9be2a49
Merge pull request #566 from yuwmao/raft
yuwmao Oct 17, 2024
d90b54d
Fix read_io in dataservice test.
xiaoxichen Oct 18, 2024
b182e7f
FIX wbcache for put and modify long running index (#567)
shosseinimotlagh Oct 22, 2024
9a06c05
Count in ovf headers.
xiaoxichen Oct 21, 2024
634047c
Reduce logs (#571)
shosseinimotlagh Oct 23, 2024
a5b2969
Change replace member api signature.
sanebay Oct 21, 2024
8a80eef
Add package version and show in log (#575)
shosseinimotlagh Oct 28, 2024
a7a9fe5
add chunksize to vchunk interface (#572)
JacksonYao287 Oct 29, 2024
60eea4a
Add index CR UT for basic merge (#556)
koujl Oct 29, 2024
c4efe11
Add additional tests for replace member (#574)
sanebay Nov 1, 2024
804cd6b
Add protection for concurrent access to m_down_buffers (#577)
koujl Nov 5, 2024
50f42ff
Implement GC_REPL_REQ Based on DSN to Prevent Resource Leaks (#576)
xiaoxichen Nov 6, 2024
3882211
Releasing data buf from memory after written to disk.
xiaoxichen Nov 7, 2024
f8426dc
add rollback on state machine add open Leader_Restart ut (#585)
Besroy Nov 11, 2024
8452fc5
PushData only pushed to active followers. (#584)
xiaoxichen Nov 13, 2024
6f6b4fb
Set min_log_gap_to_join to max_int32 and enabled new_joiner_type
xiaoxichen Nov 13, 2024
328cef3
handle nagtive log batch size returned by follower (#588)
JacksonYao287 Nov 13, 2024
f83679a
Checking received data size and reject if not match.
xiaoxichen Nov 11, 2024
93b04b7
Add application_hint into blk_alloc_hints (#591)
Hooper9973 Nov 14, 2024
da19fe4
Disable dynamic repl ut temporarily. (#593)
sanebay Nov 18, 2024
1a87f71
handle RemovedFromCluster event (#594)
JacksonYao287 Nov 25, 2024
6a2dfd8
Fix grpc crash (#595)
Besroy Nov 26, 2024
7811855
Support flexible virtual device creation in `homestore::BlkDataServic…
Hooper9973 Nov 26, 2024
89b86ff
Support Baseline Resync (#596)
yuwmao Dec 4, 2024
e03a7fd
Implement get_next_batch_size_hint_in_bytes()
xiaoxichen Dec 3, 2024
4f4df87
Bump up nuraft_mesg to >=3.7
xiaoxichen Dec 4, 2024
b38f956
Add on_repl_devs_init_completed cb.
xiaoxichen Dec 7, 2024
3b7ad0b
Calling pre_commit for lsn > dc_lsn.
xiaoxichen Dec 11, 2024
69ea506
fix potential bug of home raft log store initialization
JacksonYao287 Dec 16, 2024
6756b81
disable restart for destroy-pending repl-dev (#605)
JacksonYao287 Dec 17, 2024
c4a0697
fix twice call of leave
JacksonYao287 Dec 18, 2024
707c111
Add lock for log dev read api's. (#612)
sanebay Dec 18, 2024
0de97cd
Ensure Consistent LSN Before Opening for Traffic in Raft Group
xiaoxichen Dec 12, 2024
4bd3e12
Refine variant_node::put return value (#615)
koujl Dec 20, 2024
6695df2
read_logical_snp_obj: pass user_ctx to prevent memleak (#617)
koujl Dec 20, 2024
f69e78e
1. fix handle_error and only trigger handle_error for timeout rreqs i…
Dec 10, 2024
9f9bd45
Duplication Handling (#611)
yuwmao Dec 23, 2024
c388f69
Only call cp_flush for those consumer paticipated in this cp.
xiaoxichen Dec 19, 2024
877c041
Fix Index recovery path for split(put) (#609)
shosseinimotlagh Dec 24, 2024
b4ddbaa
reset rreq time every time we reuse a rreq
Dec 23, 2024
b27a240
fix HomeRaftLogStore::last_entry (#619)
JacksonYao287 Dec 24, 2024
5c551f0
minor fix for homeobject's homestore_test
Besroy Dec 30, 2024
d9d91cf
update last_commit_lsn in commit_config
Dec 31, 2024
348e05d
Remove log store truncation from resource mgr.
Dec 26, 2024
7734ec8
Support async snapshot io config
yuwmao Jan 6, 2025
50712d1
Avoid replaying the last flushed log entry
yuwmao Jan 9, 2025
96f8e43
Merge pull request #628 from yuwmao/fix
yuwmao Jan 9, 2025
16b0e36
skip appending dummy logs to log dev
Jan 2, 2025
c739f11
Adjust cp_io num_fiber to Prevent Deadlock (#630)
Hooper9973 Jan 16, 2025
edbc307
Ensure end_of_append_batch is Called for All Raft Log Types
Jan 16, 2025
4714820
Fix logic for setting flush_ld_key while loading logs, makes it consi…
Jan 2, 2025
e853f25
Add flush meta for single log store
yuwmao Jan 22, 2025
dbb30c0
Rename apply_snp_resync_data to save_snp_resync_data
yuwmao Jan 23, 2025
d24cd28
Merge pull request #633 from yuwmao/fix
yuwmao Jan 24, 2025
d7fc2b4
Fix bugs in snapshot transmission (#632)
koujl Jan 24, 2025
b0ee4aa
Change long index setting (#640)
shosseinimotlagh Feb 4, 2025
36b3352
Persist logstore superblock when logdev truncation is unnecessary
Feb 8, 2025
3e38fa8
Add timeout cfg for snapshot sync context
yuwmao Feb 8, 2025
3a34040
Remove snapshot creation when add_member done
yuwmao Feb 11, 2025
fb6fd08
Add function to support purging existing logs. (#643)
Besroy Feb 12, 2025
cabbc4e
Improve active peer determination logic
yuwmao Feb 13, 2025
8d8eaa4
Return grpc error if a non originator receives fetch data request
Feb 13, 2025
fb28db4
Remove optimization on blk free operation
Feb 11, 2025
70de620
Merge pull request #649 from raakella1/issue_116
raakella1 Feb 14, 2025
d31858b
graceful shutdown (#636)
JacksonYao287 Feb 20, 2025
bb39a22
Modify snapshot_context structure for persistency (#650)
koujl Feb 21, 2025
6cacae0
fix dead lock in graceful shutdown (#652)
JacksonYao287 Feb 24, 2025
77a8852
Minor fixs
Feb 24, 2025
08567d8
Fix missing fields in RaftReplDev::save_state (#654)
koujl Feb 27, 2025
cd242fd
Add event callbacks into listener for upper layer (#657)
JacksonYao287 Mar 12, 2025
43992eb
Destroy upper resources after Raft server shutdown (#658)
Besroy Mar 12, 2025
e23574a
Fixes on gc repl devs.
Mar 13, 2025
f61a1d1
Send response if failed to save pushed_data
Mar 17, 2025
053fab4
issue: 667 Enable on_repl_devs_init_completed callback on SoloReplSer…
yamingk Mar 19, 2025
36600b1
Add Disk Layout Diagram for device layer
yamingk Mar 21, 2025
b4b937e
Use an atomic in crash simulator to wait for the crash only if the fl…
Mar 24, 2025
9808c9e
retain the default behaviour of the method wait_for_crash_recovery to…
Mar 25, 2025
2a9d38d
issue: 669 update physical superblk's mgaic and product_name to disti…
yamingk Mar 25, 2025
5d6fb18
Merge pull request #674 from raakella1/index_crash_test
raakella1 Mar 26, 2025
20ec407
Async IO metrics for physical dev.
xiaoxichen Mar 21, 2025
da788e1
update conan.
xiaoxichen Mar 26, 2025
9242046
Fix baseline resync corner cases.
Mar 26, 2025
af78632
Support blk reservation
yuwmao Apr 2, 2025
dc53c44
Adding group_id to RD_LOG
xiaoxichen Apr 1, 2025
cbba03b
Add traceID into repl_key
xiaoxichen Apr 2, 2025
d8a6d99
Adopt traceID for all RD_LOG
xiaoxichen Apr 2, 2025
199bfc1
bump version
xiaoxichen Apr 2, 2025
65fb0b9
Fix NPE
xiaoxichen Apr 2, 2025
3c10d48
Merge pull request #679 from xiaoxichen/logging
yuwmao Apr 3, 2025
aefa0bb
Support custom rdev name
yuwmao Apr 7, 2025
a11f814
Merge pull request #683 from yuwmao/log
yuwmao Apr 8, 2025
47410ee
add grpc message size as config
Apr 8, 2025
1f043bf
add metric for blk usage
Apr 9, 2025
9feabb3
Fix solo repl dev log flush and graceful shutdown.
sanebay Apr 9, 2025
8b8bb95
Support handling no_space_left error in raft channel (#682)
JacksonYao287 Apr 17, 2025
63a8bbe
Adjust grpc message size according to fetch data limit as well (#691)
Besroy Apr 18, 2025
395cda9
Add additional on_commit repldev listener api's. (#692)
sanebay Apr 21, 2025
4f6fe37
reduce io number in simulate_no_space_left and disable_leader_push_da…
JacksonYao287 Apr 22, 2025
5d301ea
Fix nightly Jenkins project (#697)
shosseinimotlagh Apr 22, 2025
2047529
fix repl lsn (#699)
JacksonYao287 Apr 23, 2025
ff453b2
Make a single on_commit listener function. (#700)
sanebay Apr 24, 2025
2d58990
Add unit test to trigger eviction
Apr 21, 2025
a633946
Use the index_buffer.is_clean() to determine if it is safe to evict a…
Apr 24, 2025
ad91021
Merge pull request #690 from raakella1/cache_overflow_test
raakella1 Apr 24, 2025
9f426e0
Issue 696 Support remove_repl_dev for solo repl dev (#698)
yamingk Apr 25, 2025
460695b
Set priority when create RaftReplDev (#695)
yuwmao Apr 25, 2025
ecdae20
add traceid for replace member
Apr 25, 2025
45d7195
adopt api signature change
yamingk Apr 28, 2025
31a8b42
support handling config rollback and add periodical notification of t…
JacksonYao287 Apr 29, 2025
2dc4458
fix: init rkey with trace id
Apr 28, 2025
b8d2b78
Long remove test (#702)
shosseinimotlagh Apr 29, 2025
2a86b8f
Bump up hub.tess.io/sds/sds_develop in DockerFile (#709)
shosseinimotlagh Apr 30, 2025
a74fd29
Move sanitizer builds to its own location. (#710)
szmyd Apr 30, 2025
679e8fb
Add async_write, alloc blks for solo repl dev. (#706)
sanebay May 1, 2025
7e0a404
Revert btree config file (#711)
shosseinimotlagh May 1, 2025
f932e2b
Use application context in req struct for multi put and multi remove.…
sanebay May 5, 2025
f30f0d4
Issue 713: Fix index table destroy race with wb_cache cp flush (#714)
yamingk May 6, 2025
e87feea
Issue 716: Fix log periodic cancelt_imer issue and solo repl dev init…
yamingk May 8, 2025
9ef938c
Issue 717: expose data service drive type (#718)
yamingk May 12, 2025
9acb18e
Fix occupied_size for prefix (#719)
shosseinimotlagh May 13, 2025
b932189
add long running test with put and remove
May 7, 2025
43f7a16
Merge pull request #720 from raakella1/index_put_remove_ut
raakella1 May 15, 2025
3c1b26b
Fix prefix - reload compactbitset after updating node phys buffer (#724)
shosseinimotlagh May 16, 2025
320687b
[Solo repl dev] Fix log dev flush timer cancel race (#723)
yamingk May 17, 2025
635d780
Add submit_io_batch api in repl dev. (#725)
sanebay May 20, 2025
052394f
Redesign replacemember API
yuwmao May 15, 2025
6904f1d
Add a reaper thread to check and complete replace member
yuwmao May 28, 2025
df51d2b
Merge pull request #727 from yuwmao/replace_member_pr
yuwmao May 29, 2025
5a8aee7
Fix replace_member
yuwmao May 29, 2025
3e8d323
Merge pull request #730 from yuwmao/replace_member_pr
yuwmao May 29, 2025
7af9d96
fix bug in get_replication_status
yuwmao May 30, 2025
472f794
The usage of EVP_DigestInit_ex2 in meta_blk test requires openssl3.x …
szmyd Jun 2, 2025
f076579
Fix prefix merge and enable long running (#729)
shosseinimotlagh Jun 3, 2025
ad43af4
Fix overlapping range and enable index crash recovery for prefix (#735)
shosseinimotlagh Jun 3, 2025
575d8c1
add get_used_blk for vchunk (#733)
JacksonYao287 Jun 4, 2025
3f79968
Add truncation and recovery changes for solo repl dev. (#734)
sanebay Jun 4, 2025
85f5672
Enhance quorum check in replace_member
yuwmao Jun 9, 2025
77b82df
Merge pull request #741 from yuwmao/fix
yuwmao Jun 9, 2025
5efea90
determine proposer based on server_id
Jun 6, 2025
75b6b54
remove rreq after listener commit && handle gc free blk error accordi…
Besroy Jun 11, 2025
c752d35
Add a get_replace_member_status API for upper layer to query status (…
yuwmao Jun 17, 2025
8d9bfdc
change on_no_space_left signature (#748)
JacksonYao287 Jun 17, 2025
5822372
Support setting stage of ReplDev
yuwmao Jun 18, 2025
761113a
Issue 753 Make CP number Fibers dynamic config (#754)
yamingk Jun 26, 2025
00606a0
Support replDev UNREADY stage (#755)
yuwmao Jun 26, 2025
4841880
Enable log to console, this will help sherlock collect nuraft logs mo…
Jun 26, 2025
cff1332
Add varsize allow partial alloc and chunk selector changes. (#747)
sanebay Jun 26, 2025
327ab32
Change task_id to string (#758)
yuwmao Jun 27, 2025
7b9e224
minor fix on log dev
Jul 8, 2025
f7fd108
support effective log truncation
Jul 3, 2025
2d26b25
do not use memory_order_relax for get_used_blks (#739)
JacksonYao287 Jul 10, 2025
f9e4340
Support pausing/resuming state machine (#769)
yuwmao Jul 10, 2025
cea838b
Fix bugs in rapair links during crash recovery of the btree (#749)
raakella1 Jul 11, 2025
8984792
Support formatting new disk after bootstrap (#766)
yuwmao Jul 15, 2025
1eb131b
Refine the algorithm to calculate pdev chunks on vdev (#772)
yuwmao Jul 17, 2025
ce24955
Record cur_pdev_id in first block header (#776)
yuwmao Jul 21, 2025
2592b01
Fix monitor_replace_member_replication_status (#774)
yuwmao Jul 21, 2025
8cf9553
Run cp mgr timer in its own reactor. (#761)
sanebay Jul 21, 2025
03dd4ce
Add index chunk selector hb (#768)
shosseinimotlagh Jul 21, 2025
33362c1
Issue: 771 Fault Containment Service (#773)
yamingk Jul 22, 2025
be86e44
Fix negative metrics and return back 1.3 metrics (#775)
shosseinimotlagh Jul 22, 2025
47512e1
Fast sanity check of index table after recovery (#767)
shosseinimotlagh Jul 22, 2025
bb8d07a
Fix prefix merge (#742)
shosseinimotlagh Jul 23, 2025
b0482c0
Fix table ordinal (#777)
shosseinimotlagh Jul 24, 2025
3054646
Adding more logs to check actual vdev cp flush and freeing blkids (#778)
shosseinimotlagh Jul 25, 2025
f2b02c0
flush a buffer only if it is dirtied in the current cp
Jul 26, 2025
06e6c49
add comment explaining the change
Jul 26, 2025
9c39af4
skip sanity check for the new bufs which are not considered after rec…
Jul 28, 2025
53410c2
Merge pull request #781 from raakella1/wbcache_cp
raakella1 Jul 29, 2025
3ffa892
Add metrics for cp and blk alloc latency. (#782)
sanebay Jul 30, 2025
f7570e0
set buf state clean after getting its down buf during cp flush
Jul 30, 2025
0f1ab23
Merge pull request #783 from raakella1/buf_status
raakella1 Jul 31, 2025
a4542bd
return no-op if no chunk available (#785)
JacksonYao287 Aug 4, 2025
5c82e7d
UTs for simulating tombstone and GC (#737)
shosseinimotlagh Aug 7, 2025
1eff796
Next version of HomeStore, where following major changes are implemented
hkadayam Aug 8, 2025
b15a6dc
Merge branch 'master' into clean-integration
hkadayam Aug 8, 2025
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
2 changes: 2 additions & 0 deletions .github/workflows/build_dependencies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,8 @@ jobs:

- name: Code Coverage Run
run: |
du -sh ~/.conan2/p/*
df -h
conan build \
-o "sisl/*:prerelease=${{ inputs.prerelease }}" \
-o "sisl/*:malloc_impl=${{ inputs.malloc-impl }}" \
Expand Down
2 changes: 1 addition & 1 deletion .jenkins/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# ########## ####### ############
FROM hub.tess.io/sds/sds_develop:4.x-latest
FROM hub.tess.io/sds/sds_develop:7.x-latest
LABEL description="Automated HomeStore compilation"

WORKDIR /output
Expand Down
38 changes: 22 additions & 16 deletions .jenkins/jenkinsfile_nightly
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
pipeline {
agent { label 'sds-builder-2204' }
agent { label 'sds-builder-v5' }
triggers {
cron('TZ=US/Pacific\nH H(0-2) * * *')
}
Expand All @@ -8,7 +8,7 @@ pipeline {
ORG = 'sds'
ECR_URL = 'hub.tess.io'
ARTIFACTORY_PASS = credentials('ARTIFACTORY_PASS')
CONAN_USER = 'sds'
CONAN_USER = 'oss'
failed_stage = ""
}
stages {
Expand All @@ -26,6 +26,7 @@ pipeline {
VER = sh(script: "grep -m 1 ' version =' conanfile.py | awk '{print \$3}' | tr -d '\n' | tr -d '\"'", returnStdout: true)
NIGHTLY_TAG = "master-nightly-debug-4.0"
ECR_PATH = "${ECR_URL}/${ORG}/${PROJECT}"
CONAN_FLAGS="--name ${PROJECT} --user ${CONAN_USER} --channel ${NIGHTLY_TAG}"
failed_stage = ""
}
}
Expand All @@ -40,20 +41,25 @@ pipeline {
}
stage("Build") {
steps {
sh "conan create --build missing -o homestore:sanitize=True -pr debug . ${PROJECT}/${VER}@"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_index_btree' -exec cp {} .jenkins/test_index_btree \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_index_crash_recovery' -exec cp {} .jenkins/test_index_crash_recovery \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_meta_blk_mgr' -exec cp {} .jenkins/test_meta_blk_mgr \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_log_store' -exec cp {} .jenkins/test_log_store \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_home_raft_logstore' -exec cp {} .jenkins/test_home_raft_logstore \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_log_store_long_run' -exec cp {} .jenkins/test_log_store_long_run \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_data_service' -exec cp {} .jenkins/test_data_service \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_raft_repl_dev' -exec cp {} .jenkins/test_raft_repl_dev \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*tests/test_solo_repl_dev' -exec cp {} .jenkins/test_solo_repl_dev \\;"
sh "find ${CONAN_USER_HOME} -type f -wholename '*bin/scripts/index_test.py' -exec install -Dm755 {} .jenkins/index_test.py \\; "
sh "find ${CONAN_USER_HOME} -type f -wholename '*bin/scripts/log_meta_test.py' -exec install -Dm755 {} .jenkins/log_meta_test.py \\; "
sh "find ${CONAN_USER_HOME} -type f -wholename '*bin/scripts/data_test.py' -exec install -Dm755 {} .jenkins/data_test.py \\; "
sh "find ${CONAN_USER_HOME} -type f -wholename '*bin/scripts/long_running.py' -exec install -Dm755 {} .jenkins/long_running.py \\; "
sh '''
hostname
echo $NODE_NAME
conan create --build missing -s:h build_type=Debug -o ${PROJECT}/*:sanitize=True ${CONAN_FLAGS} .

find /home/jenkins -type f -wholename '*/test_index_btree' -exec cp {} .jenkins/test_index_btree \\;
find /home/jenkins -type f -wholename '*/test_index_crash_recovery' -exec cp {} .jenkins/test_index_crash_recovery \\;
find /home/jenkins -type f -wholename '*/test_meta_blk_mgr' -exec cp {} .jenkins/test_meta_blk_mgr \\;
find /home/jenkins -type f -wholename '*/test_log_store' -exec cp {} .jenkins/test_log_store \\;
find /home/jenkins -type f -wholename '*/test_home_raft_logstore' -exec cp {} .jenkins/test_home_raft_logstore \\;
find /home/jenkins -type f -wholename '*/test_log_store_long_run' -exec cp {} .jenkins/test_log_store_long_run \\;
find /home/jenkins -type f -wholename '*/test_data_service' -exec cp {} .jenkins/test_data_service \\;
find /home/jenkins -type f -wholename '*/test_raft_repl_dev' -exec cp {} .jenkins/test_raft_repl_dev \\;
find /home/jenkins -type f -wholename '*/test_solo_repl_dev' -exec cp {} .jenkins/test_solo_repl_dev \\;
find /home/jenkins -type f -wholename '*/test_scripts/index_test.py' -exec install -Dm755 {} .jenkins/index_test.py \\;
find /home/jenkins -type f -wholename '*/test_scripts/log_meta_test.py' -exec install -Dm755 {} .jenkins/log_meta_test.py \\;
find /home/jenkins -type f -wholename '*/test_scripts/data_test.py' -exec install -Dm755 {} .jenkins/data_test.py \\;
find /home/jenkins -type f -wholename '*/test_scripts/long_running.py' -exec install -Dm755 {} .jenkins/long_running.py \\;
'''
}
post {
failure {
Expand Down
12 changes: 12 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,18 @@ endif ()
add_flags("-DPACKAGE_NAME=\\\"${PROJECT_NAME}\\\"")
add_flags("-DPACKAGE_VERSION=\\\"${PACKAGE_REVISION}\\\"")

# add replication flag
if (DEFINED REPLICATION)
if (${REPLICATION} STREQUAL "ON")
add_flags("-DREPLICATION_SUPPORT")
message(STATUS "Building with REPLICATION enabled")
else()
message(STATUS "Building with REPLICATION disabled")
endif()
else()
message(STATUS "Building with REPLICATION disabled")
endif()

if(UNIX)
# enable proper pread/pwrite and large file
add_flags("-D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE")
Expand Down
6 changes: 6 additions & 0 deletions cmake/test_mode.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ if (DEFINED TEST_TARGET)
set(${ret} true)
endif()
endmacro()
macro(can_build_repl_tests ret)
set(${ret} false)
endmacro()
else()
macro(can_build_io_tests ret)
set(${ret} false)
Expand All @@ -55,4 +58,7 @@ else()
macro(can_build_epoll_io_tests ret)
set(${ret} false)
endmacro()
macro(can_build_repl_tests ret)
set(${ret} false)
endmacro()
endif()
23 changes: 20 additions & 3 deletions conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

class HomestoreConan(ConanFile):
name = "homestore"
version = "5.2.2"
version = "5.3.1"

homepage = "https://github.com/eBay/Homestore"
description = "HomeStore Storage Engine"
Expand All @@ -25,13 +25,15 @@ class HomestoreConan(ConanFile):
"coverage": ['True', 'False'],
"sanitize": ['True', 'False'],
"testing" : ['full', 'min', 'off', 'epoll_mode', 'spdk_mode'],
"replication" : ['off', 'on'],
}
default_options = {
'shared': False,
'fPIC': True,
'coverage': False,
'sanitize': False,
'testing': 'epoll_mode',
'replication': 'off',
}

exports_sources = "cmake/*", "src/*", "CMakeLists.txt", "test_wrap.sh", "LICENSE"
Expand All @@ -54,18 +56,27 @@ def build_requirements(self):
def requirements(self):
self.requires("iomgr/[^12.1]@oss/master", transitive_headers=True)
self.requires("sisl/[^13.3]@oss/master", transitive_headers=True)
self.requires("nuraft_mesg/[^4.1]@oss/main", transitive_headers=True)
if str(self.options.replication) == "on":
self.requires("nuraft_mesg/[^4.1]@oss/main", transitive_headers=True)

self.requires("farmhash/cci.20190513@", transitive_headers=True)
if self.settings.arch in ['x86', 'x86_64']:
self.requires("isa-l/2.30.0", transitive_headers=True)

# Tests require OpenSSL 3.x
self.requires("openssl/[^3.1]", override=True)

def imports(self):
self.copy(root_package="sisl", pattern="*", dst="bin/scripts/python/flip/", src="bindings/flip/python/", keep_path=False)

def layout(self):
self.folders.source = "."
self.folders.build = join("build", str(self.settings.build_type))
if self.options.get_safe("sanitize"):
self.folders.build = join("build", "Sanitized")
elif self.options.get_safe("coverage"):
self.folders.build = join("build", "Coverage")
else:
self.folders.build = join("build", str(self.settings.build_type))
self.folders.generators = join(self.folders.build, "generators")

self.cpp.source.includedirs = ["src/include"]
Expand Down Expand Up @@ -94,6 +105,12 @@ def generate(self):
tc.variables['BUILD_COVERAGE'] = 'ON'
elif self.options.get_safe("sanitize"):
tc.variables['MEMORY_SANITIZER_ON'] = 'ON'
tc.variables["CONAN_PACKAGE_NAME"] = self.name
tc.variables["CONAN_PACKAGE_VERSION"] = self.version
if str(self.options.replication) == "on":
tc.variables["REPLICATION"] = "ON"
else:
tc.variables["REPLICATION"] = "OFF"
tc.generate()

# This generates "boost-config.cmake" and "grpc-config.cmake" etc in self.generators_folder
Expand Down
Binary file added docs/imgs/HomeStore_Disk_Layout2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 29 additions & 14 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,27 @@ find_package(isa-l QUIET)
find_package(iomgr QUIET REQUIRED)
find_package(farmhash QUIET REQUIRED)
find_package(GTest QUIET REQUIRED)
find_package(NuraftMesg QUIET REQUIRED)
if (DEFINED REPLICATION)
if (${REPLICATION} STREQUAL "ON")
find_package(NuraftMesg QUIET REQUIRED)
endif()
endif()

list(APPEND COMMON_DEPS
iomgr::iomgr
farmhash::farmhash
nuraft_mesg::proto
nuraft::nuraft
sisl::sisl
)

if (DEFINED REPLICATION)
if (${REPLICATION} STREQUAL "ON")
list(APPEND COMMON_DEPS
nuraft_mesg::proto
nuraft::nuraft
)
endif()
endif()

if (${isa-l_FOUND})
list(APPEND COMMON_DEPS isa-l::isa-l)
else ()
Expand All @@ -42,7 +54,11 @@ add_subdirectory(lib/logstore)
add_subdirectory(lib/meta)
add_subdirectory(lib/index)
add_subdirectory(lib/blkdata_svc/)
add_subdirectory(lib/replication/)
if (DEFINED REPLICATION)
if (${REPLICATION} STREQUAL "ON")
add_subdirectory(lib/replication/)
endif()
endif()

if(NOT DEFINED BUILD_TESTING OR BUILD_TESTING)
add_subdirectory(tests)
Expand All @@ -59,20 +75,19 @@ set(HOMESTORE_OBJECTS
$<TARGET_OBJECTS:hs_mem_btree>
$<TARGET_OBJECTS:hs_cow_btree>
$<TARGET_OBJECTS:hs_datasvc>
$<TARGET_OBJECTS:hs_replication>
lib/homestore.cpp
lib/crc.cpp
)
#target_link_libraries(homestore_objs ${COMMON_DEPS})
if (${CMAKE_BUILD_TYPE} STREQUAL "Debug")
add_library(homestore STATIC
${HOMESTORE_OBJECTS}
)
else()
add_library(homestore STATIC
${HOMESTORE_OBJECTS}
)

if (DEFINED REPLICATION)
if (${REPLICATION} STREQUAL "ON")
list(APPEND HOMESTORE_OBJECTS $<TARGET_OBJECTS:hs_replication>)
endif()
endif()
#target_link_libraries(homestore_objs ${COMMON_DEPS})

add_library(homestore STATIC
${HOMESTORE_OBJECTS}
)
target_compile_definitions (homestore PRIVATE LOG_MODS_V2_SUPPORT)
target_link_libraries(homestore PRIVATE ${COMMON_DEPS})
9 changes: 7 additions & 2 deletions src/include/homestore/blk.h
Original file line number Diff line number Diff line change
Expand Up @@ -251,9 +251,14 @@ VENUM(BlkAllocStatus, uint32_t,

struct blk_alloc_hints {
blk_temp_t desired_temp{0}; // Temperature hint for the device
std::optional< uint32_t > pdev_id_hint{std::nullopt}; // which physical device to pick (hint if any)
std::optional< chunk_num_t > chunk_id_hint{std::nullopt}; // any specific chunk id to pick for this allocation
std::optional< uint32_t > reserved_blks{std::nullopt}; // Reserved blks in a chunk
std::optional< uint32_t > pdev_id_hint{std::nullopt}; // which physical device to pick (hint if any)
std::optional< chunk_num_t > chunk_id_hint{std::nullopt}; // any specific chunk id to pick for this allocation
std::optional< MultiBlkId > committed_blk_id{
std::nullopt}; // blk id indicates the blk was already allocated and committed, don't allocate and commit again
std::optional< stream_id_t > stream_id_hint{std::nullopt}; // any specific stream to pick
std::optional< uint64_t > application_hint{
std::nullopt}; // hints in uint64 what will be passed opaque to select_chunk
bool can_look_for_other_chunk{true}; // If alloc on device not available can I pick other device
bool is_contiguous{true}; // Should the entire allocation be one contiguous block
bool partial_alloc_ok{false}; // ok to allocate only portion of nblks? Mutually exclusive with is_contiguous
Expand Down
66 changes: 62 additions & 4 deletions src/include/homestore/blkdata_service.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,19 @@ class BlkDataService {

/**
* @brief Creates a new virtual device with the specified size and block size, using the specified
* block allocator and chunk selector types. The virtual device will be composed of the specified
* number of chunks.
* block allocator and chunk selector types. The virtual device will be composed of a number of chunks.
* Either `num_chunks` or `chunk_size` must be specified.
* Prioritize `num_chunks` over `chunk_size` if both are provided.
*
* @param size The size of the virtual device, in bytes.
* @param blk_size The size of each block in the virtual device, in bytes.
* @param alloc_type The type of block allocator to use for the virtual device.
* @param chunk_sel_type The type of chunk selector to use for the virtual device.
* @param num_chunks The number of chunks to use for the virtual device.
* @param chunk_size The size of chunks to use for the virtual device, in bytes.
*/
void create_vdev(uint64_t size, HSDevType devType, uint32_t blk_size, blk_allocator_type_t alloc_type,
chunk_selector_type_t chunk_sel_type, uint32_t num_chunks);
chunk_selector_type_t chunk_sel_type, uint32_t num_chunks, uint32_t chunk_size);

/**
* @brief Opens a virtual device with the specified virtual device information.
Expand Down Expand Up @@ -112,6 +114,18 @@ class BlkDataService {
folly::Future< std::error_code > async_write(sisl::sg_list const& sgs, MultiBlkId const& in_blkids,
bool part_of_batch = false);

/**
* @brief : asynchronous write with input block ids;
*
* @param sgs : the data buffer that needs to be written
* @param hints : blk alloc hints
* @param in_blkids : input block ids that this write should be written to;
* @param cb : callback that will be triggered after write completes
* @param part_of_batch : is this write part of a batch;
*/
folly::Future< std::error_code > async_write(sisl::sg_list const& sgs, std::vector< MultiBlkId > const& in_blkids,
bool part_of_batch = false);

/**
* @brief Asynchronously reads data from the specified block ID into the provided buffer.
*
Expand All @@ -137,6 +151,13 @@ class BlkDataService {
folly::Future< std::error_code > async_read(MultiBlkId const& bid, sisl::sg_list& sgs, uint32_t size,
bool part_of_batch = false);

/**
* @brief Submit the io batch, which is a mandatory method to be called if read/write are issued with part_of_batch
* is set to true. In those cases, without this method, IOs might not be even issued. No-op if previous io requests
* are not part of batch.
* */
void submit_io_batch();

/**
* @brief Commits the block with the given MultiBlkId.
*
Expand All @@ -145,7 +166,8 @@ class BlkDataService {
BlkAllocStatus commit_blk(MultiBlkId const& bid);

/**
* @brief Allocates a contiguous block of disk space of the given size.
* @brief Allocates a contiguous block of disk space of the given size. This API should be called that when consumer
* is expecting blks only allocated on same chunk.
*
* @param size The size of the block to allocate, in bytes.
* @param hints Hints for how to allocate the block.
Expand All @@ -154,6 +176,17 @@ class BlkDataService {
*/
BlkAllocStatus alloc_blks(uint32_t size, blk_alloc_hints const& hints, MultiBlkId& out_blkids);

/**
* @brief Allocates blocks of disk space of the given size.This API should be called when consumer is expecting blk
* allocation happen on different chunks is possible and acceptable.
*
* @param size The size of the block to allocate, in bytes.
* @param hints Hints for how to allocate the block.
* @param out_blkids Output parameter that will be filled with the IDs of the allocated blocks.
* @return The status of the block allocation attempt.
*/
BlkAllocStatus alloc_blks(uint32_t size, blk_alloc_hints const& hints, std::vector< BlkId >& out_blkids);

/**
* @brief Asynchronously frees the specified block IDs.
* It is asynchronous because it might need to wait for pending read to complete if same block is being read and not
Expand Down Expand Up @@ -194,10 +227,35 @@ class BlkDataService {
*/
void start();

/**
* @brief Gets the total capacity of the block data service.
*
* This function returns the total capacity of the block data service, in bytes.
*
* @return The total capacity of the block data service, in bytes.
*/
uint64_t get_total_capacity() const;

/**
* @brief Gets the used capacity of the block data service.
*
* This function returns the used capacity of the block data service, in bytes.
*
* @return The used capacity of the block data service, in bytes.
*/
uint64_t get_used_capacity() const;

/**
* @brief Gets the drive type of the data service.
*
* Data Service doesn't support mixed drive types.
*
* @return The drive type of the data service, HDD or NVME.
*/
HSDevType get_dev_type() const;

void stop();

private:
/**
* @brief Initializes the block data service.
Expand Down
Loading
Loading