macOS: portability + RPC in-proc fallback#55
Open
SoumojitDalui wants to merge 5 commits intomakodb:mako-devfrom
Open
macOS: portability + RPC in-proc fallback#55SoumojitDalui wants to merge 5 commits intomakodb:mako-devfrom
SoumojitDalui wants to merge 5 commits intomakodb:mako-devfrom
Conversation
Moving to current version
…-upstream macOS: portability + RPC in-proc fallback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
TL;DR
This PR adds macOS support (including Apple Silicon) while preserving Linux behavior. It vendors
yaml-cpp, gates Linux-only features behind build flags, and adds an in-process RPC fallback so the existing CI/tests run reliably on macOS.Details
CMake / Dependencies
libdpdkoptional so macOS can configure without it./opt/homebrewand/usr/local).yaml-cppfromdependencies/yaml-cppand linkyaml-cpp::yaml-cppintotxlog, executables, and tests.ENABLE_ERPC/ENABLE_RPCtoggles; defaultENABLE_ERPC=OFFon macOS; compile/link eRPC only when enabled.-lnuma,-lrt, and-lboost_system).NUMA (Linux kept, macOS stubbed)
src/compat/numa.hand use it on macOS so code including<numa.h>compiles withoutlibnuma.macOS / Apple Silicon portability
<sys/sysinfo.h>).fdatasync()withfsync()on macOS.MADV_HUGEPAGE.malloc/malloc.hon macOS wheremalloc.his unavailable.memalign()withposix_memalign()on macOS.mach_absolute_time()/cntvct_el0).RPC: in-process fallback for macOS restrictions
src/rrr/rpc/inproc_transport.*and integrate it into client/server.bind()fails withEPERM, server registers an in-process endpoint and clients connect viasocketpair()(no TCP bind/listen).SO_NOSIGPIPEon macOS sockets to prevent SIGPIPE termination.Reactor fixes
Fiber::sleep(0)return immediately.