├── .circleci ├── config.yml └── conv.xsl ├── .dockerignore ├── .gitignore ├── .gitmodules ├── .travis.yml ├── CNAME ├── CODE_OF_CONDUCT.md ├── CONTRIBUTING.md ├── LICENSE ├── README.md ├── build ├── facebook_fbcode_builder_config.py ├── fbcode_builder │ ├── .gitignore │ ├── CMake │ │ ├── FBBuildOptions.cmake │ │ ├── FBCMakeParseArgs.cmake │ │ ├── FBCompilerSettings.cmake │ │ ├── FBCompilerSettingsMSVC.cmake │ │ ├── FBCompilerSettingsUnix.cmake │ │ ├── FBPythonBinary.cmake │ │ ├── FBPythonTestAddTests.cmake │ │ ├── FBThriftCppLibrary.cmake │ │ ├── FBThriftLibrary.cmake │ │ ├── FBThriftPyLibrary.cmake │ │ ├── FindGMock.cmake │ │ ├── FindGflags.cmake │ │ ├── FindGlog.cmake │ │ ├── FindLibEvent.cmake │ │ ├── FindLibUnwind.cmake │ │ ├── FindPCRE.cmake │ │ ├── FindRe2.cmake │ │ ├── fb_py_test_main.py │ │ ├── fb_py_win_main.c │ │ └── make_fbpy_archive.py │ ├── LICENSE │ ├── README.docker │ ├── README.facebook │ ├── README.md │ ├── docker_build_with_ccache.sh │ ├── docker_builder.py │ ├── docker_enable_ipv6.sh │ ├── facebook_fbcode_builder_config.py │ ├── facebook_fbsource_utils.py │ ├── facebook_legocastle_builder.py │ ├── facebook_make_legocastle_job.py │ ├── fbcode_builder.py │ ├── fbcode_builder_config.py │ ├── getdeps.py │ ├── getdeps │ │ ├── __init__.py │ │ ├── builder.py │ │ ├── buildopts.py │ │ ├── cache.py │ │ ├── copytree.py │ │ ├── dyndeps.py │ │ ├── envfuncs.py │ │ ├── errors.py │ │ ├── expr.py │ │ ├── fetcher.py │ │ ├── load.py │ │ ├── manifest.py │ │ ├── platform.py │ │ ├── py_wheel_builder.py │ │ ├── runcmd.py │ │ ├── subcmd.py │ │ └── test │ │ │ ├── expr_test.py │ │ │ ├── fixtures │ │ │ └── duplicate │ │ │ │ ├── foo │ │ │ │ └── subdir │ │ │ │ └── foo │ │ │ ├── manifest_test.py │ │ │ ├── platform_test.py │ │ │ └── scratch_test.py │ ├── make_docker_context.py │ ├── manifests │ │ ├── OpenNSA │ │ ├── autoconf │ │ ├── automake │ │ ├── bison │ │ ├── boost │ │ ├── cmake │ │ ├── cpptoml │ │ ├── double-conversion │ │ ├── eden │ │ ├── eden_scm │ │ ├── eden_scm_lib_edenapi_tools │ │ ├── fatal │ │ ├── fb303 │ │ ├── fb303-source │ │ ├── fboss │ │ ├── fbthrift │ │ ├── fbthrift-source │ │ ├── fbzmq │ │ ├── fizz │ │ ├── flex │ │ ├── fmt │ │ ├── folly │ │ ├── gflags │ │ ├── git-lfs │ │ ├── glog │ │ ├── gnu-bash │ │ ├── gnu-coreutils │ │ ├── gnu-grep │ │ ├── gnu-sed │ │ ├── googletest │ │ ├── googletest_1_8 │ │ ├── gperf │ │ ├── iproute2 │ │ ├── jq │ │ ├── katran │ │ ├── libbpf │ │ ├── libbpf_0_2_0_beta │ │ ├── libcurl │ │ ├── libelf │ │ ├── libevent │ │ ├── libgit2 │ │ ├── libmnl │ │ ├── libnl │ │ ├── libsai │ │ ├── libsodium │ │ ├── libtool │ │ ├── libusb │ │ ├── libzmq │ │ ├── lz4 │ │ ├── mononoke │ │ ├── mononoke_integration │ │ ├── mvfst │ │ ├── nghttp2 │ │ ├── ninja │ │ ├── nmap │ │ ├── openr │ │ ├── openssl │ │ ├── osxfuse │ │ ├── patchelf │ │ ├── pcre │ │ ├── perl │ │ ├── pexpect │ │ ├── proxygen │ │ ├── python │ │ ├── python-click │ │ ├── python-dulwich │ │ ├── python-ptyprocess │ │ ├── python-six │ │ ├── python-toml │ │ ├── re2 │ │ ├── rocksdb │ │ ├── rust-shed │ │ ├── snappy │ │ ├── sqlite3 │ │ ├── sqlite3-bin │ │ ├── tcl │ │ ├── tree │ │ ├── wangle │ │ ├── watchman │ │ ├── zlib │ │ └── zstd │ ├── parse_args.py │ ├── shell_builder.py │ ├── shell_quoting.py │ ├── specs │ │ ├── __init__.py │ │ ├── fbthrift.py │ │ ├── fbzmq.py │ │ ├── fizz.py │ │ ├── fmt.py │ │ ├── folly.py │ │ ├── gmock.py │ │ ├── mvfst.py │ │ ├── proxygen.py │ │ ├── proxygen_quic.py │ │ ├── re2.py │ │ ├── rocksdb.py │ │ ├── sodium.py │ │ ├── wangle.py │ │ └── zstd.py │ ├── travis_docker_build.sh │ └── utils.py └── fbcode_builder_config.py ├── common ├── README.md └── fb303 │ └── cpp │ └── FacebookBase2.h ├── docker └── Dockerfile.ubuntu ├── docs ├── API_Introduction.md ├── FailureDetection.md ├── LogsDB.md ├── ReadPath.md ├── Rebuilding.md ├── Recovery.md ├── Replication.md ├── Terminology.md ├── TrafficShaping.md ├── Write_path.md ├── administration │ ├── admin_server.md │ ├── ldquery.md │ ├── ldshell.md │ ├── maintenances.md │ └── safety_checker.md ├── assets │ ├── LogDevice_Consensus_deepdive.pdf │ ├── admin_server_overview.png │ ├── diagram_sources │ │ └── admin_server_overview.xml │ ├── ldshell-check-impact-example.png │ ├── ldshell-maintenance-capacity-1.png │ ├── ldshell-maintenance-completed-1.png │ ├── ldshell-maintenance-drain-two-nodes-1.png │ ├── ldshell-maintenance-drain-two-nodes-2.png │ ├── ldshell-maintenance-rebuilding-stall-1.png │ ├── ldshell-maintenance-safe-1.png │ ├── ldshell-screenshot-1.png │ ├── ldshell-status-1.png │ ├── ldshell-status-2.png │ ├── ldshell-status-completed-maintenance-1.png │ ├── logsdb │ │ └── SST_files.png │ ├── maintenance-manager-design.jpg │ ├── readpath │ │ ├── read_overview.png │ │ ├── read_path_table_3nodes.png │ │ ├── read_path_table_twonodes.png │ │ ├── read_sliding_window.png │ │ ├── read_start.png │ │ └── records_send.png │ ├── rebuilding │ │ ├── drain_is_false_flow.graffle │ │ ├── drain_is_false_flow.png │ │ ├── drain_is_true_flow.graffle │ │ ├── drain_is_true_flow.png │ │ ├── mini_rebuilding_flow.graffle │ │ ├── mini_rebuilding_flow.png │ │ └── rebuilding_copyset.png │ ├── record_placement.jpg │ ├── recovery │ │ ├── after_recovery.png │ │ ├── final_consensus_state.png │ │ ├── node_and_sequencer_fail.png │ │ ├── records_after_recovery.png │ │ └── steadystate.png │ ├── replication │ │ ├── epoch_segments_of_a_log.png │ │ ├── historical_epoch_segments.png │ │ ├── log_replication_configuration.png │ │ └── replication_configuration.png │ ├── traffic_shaping │ │ ├── Logdevice_bandwidth_bucket.jpg │ │ ├── Logdevice_bw_overflow_capture.jpg │ │ ├── Logdevice_flowgroup.jpg │ │ ├── Logdevice_last_overflow_application.jpg │ │ ├── Logdevice_priorityq_last_overflow.jpg │ │ ├── Logdevice_worker_flowgroups.jpg │ │ ├── traffic_shaping_configuring.png │ │ └── traffic_shaping_graphics.png │ └── writepath │ │ ├── out_of_order_ack.png │ │ ├── replication_property.png │ │ ├── write_path.mov │ │ └── write_path_logdevice.png ├── concepts.md ├── configuration.md ├── consistency.md ├── doxygen.md ├── firstcluster.md ├── installation.md ├── kubernetes.md ├── localcluster.md ├── log_configuration.md ├── overview.md ├── settings.md └── writing_plugins.md ├── k8s ├── config.json ├── kustomization.yaml ├── logdevice-admin-server.yaml ├── logdevice-service.yaml └── logdevice-statefulset.yaml ├── logdevice ├── .clang-format ├── .flake8 ├── .gitignore ├── CMake │ ├── FindCython.cmake │ ├── FindDoubleConversion.cmake │ ├── FindJeMalloc.cmake │ ├── FindLZ4.cmake │ ├── FindLibDl.cmake │ ├── FindLibEvent.cmake │ ├── FindLibIberty.cmake │ ├── FindLibsodium.cmake │ ├── FindLibunwind.cmake │ ├── FindSnappy.cmake │ ├── FindSqlite.cmake │ ├── FindZookeeper.cmake │ ├── FindZstd.cmake │ ├── build-config.cmake │ ├── build-docs.cmake │ ├── build-fbthrift.cmake │ ├── build-fizz.cmake │ ├── build-fmt.cmake │ ├── build-folly.cmake │ ├── build-rocksdb.cmake │ ├── build-wangle.cmake │ ├── logdevice-deps.cmake │ └── logdevice-functions.cmake ├── CMakeLists.txt ├── Doxyfile ├── admin │ ├── AdminAPIHandler.cpp │ ├── AdminAPIHandler.h │ ├── AdminAPIHandlerBase.cpp │ ├── AdminAPIHandlerBase.h │ ├── AdminAPIUtils.cpp │ ├── AdminAPIUtils.h │ ├── AdminCommandAPIHandler.cpp │ ├── AdminCommandAPIHandler.h │ ├── AdminCommandHandler.h │ ├── CMakeLists.txt │ ├── CheckImpactHandler.cpp │ ├── CheckImpactHandler.h │ ├── ClusterMembershipAPIHandler.cpp │ ├── ClusterMembershipAPIHandler.h │ ├── Conv.cpp │ ├── Conv.h │ ├── MaintenanceAPIHandler.cpp │ ├── MaintenanceAPIHandler.h │ ├── MetadataNodesetSelector.cpp │ ├── MetadataNodesetSelector.h │ ├── NodesConfigAPIHandler.cpp │ ├── NodesConfigAPIHandler.h │ ├── NodesStateAPIHandler.cpp │ ├── NodesStateAPIHandler.h │ ├── SettingOverrideTTLRequest.cpp │ ├── SettingOverrideTTLRequest.h │ ├── cluster_membership │ │ ├── AddNodesHandler.cpp │ │ ├── AddNodesHandler.h │ │ ├── BootstrapClusterHandler.cpp │ │ ├── BootstrapClusterHandler.h │ │ ├── BumpNodeGenerationHandler.cpp │ │ ├── BumpNodeGenerationHandler.h │ │ ├── ClusterMembershipUtils.cpp │ │ ├── ClusterMembershipUtils.h │ │ ├── MarkShardsAsProvisionedHandler.cpp │ │ ├── MarkShardsAsProvisionedHandler.h │ │ ├── RemoveNodesHandler.cpp │ │ ├── RemoveNodesHandler.h │ │ ├── UpdateNodesHandler.cpp │ │ └── UpdateNodesHandler.h │ ├── if │ │ ├── CMakeLists.txt │ │ ├── admin.thrift │ │ ├── admin_commands.thrift │ │ ├── cluster_membership.thrift │ │ ├── exceptions.thrift │ │ ├── logtree.thrift │ │ ├── maintenance.thrift │ │ ├── nodes.thrift │ │ ├── safety.thrift │ │ └── settings.thrift │ ├── maintenance │ │ ├── APIUtils.cpp │ │ ├── APIUtils.h │ │ ├── ClusterMaintenanceStateMachine.cpp │ │ ├── ClusterMaintenanceStateMachine.h │ │ ├── ClusterMaintenanceWrapper.cpp │ │ ├── ClusterMaintenanceWrapper.h │ │ ├── EventLogWriter.cpp │ │ ├── EventLogWriter.h │ │ ├── MaintenanceDelta.thrift │ │ ├── MaintenanceDeltaTypes.cpp │ │ ├── MaintenanceDeltaTypes.h │ │ ├── MaintenanceLogWriter.cpp │ │ ├── MaintenanceLogWriter.h │ │ ├── MaintenanceManager.cpp │ │ ├── MaintenanceManager.h │ │ ├── MaintenanceManagerTracer.cpp │ │ ├── MaintenanceManagerTracer.h │ │ ├── SafetyCheckScheduler.cpp │ │ ├── SafetyCheckScheduler.h │ │ ├── SequencerWorkflow.cpp │ │ ├── SequencerWorkflow.h │ │ ├── ShardWorkflow.cpp │ │ ├── ShardWorkflow.h │ │ ├── test │ │ │ ├── APIUtilsTest.cpp │ │ │ ├── ClusterMaintenanceStateCodecTest.cpp │ │ │ ├── ClusterMaintenanceStateMachineTest.cpp │ │ │ ├── ClusterMaintenanceWrapperTest.cpp │ │ │ ├── MaintenanceManagerTest.cpp │ │ │ ├── MaintenanceTestUtil.cpp │ │ │ ├── MaintenanceTestUtil.h │ │ │ ├── SafetyCheckSchedulerTest.cpp │ │ │ ├── SequencerWorkflowTest.cpp │ │ │ └── ShardWorkflowTest.cpp │ │ └── types.h │ ├── safety │ │ ├── LogMetaDataFetcher.cpp │ │ ├── LogMetaDataFetcher.h │ │ ├── SafetyAPI.cpp │ │ ├── SafetyAPI.h │ │ ├── SafetyChecker.cpp │ │ ├── SafetyChecker.h │ │ ├── SafetyCheckerUtils.cpp │ │ └── SafetyCheckerUtils.h │ ├── settings │ │ ├── AdminServerSettings.cpp │ │ └── AdminServerSettings.h │ ├── test │ │ ├── AdminAPIUtilsTest.cpp │ │ ├── AdminCommandAPIHandlerTest.cpp │ │ ├── ClusterMembershipAPIHandlerTest.cpp │ │ ├── MetadataNodesetSelectorTest.cpp │ │ └── SafetyCheckerTest.cpp │ ├── toString.cpp │ └── toString.h ├── build_tools │ ├── ubuntu.deps │ └── ubuntu_runtime.deps ├── clients │ └── python │ │ ├── CMakeLists.txt │ │ ├── client.pyi │ │ ├── logdevice_client.cpp │ │ ├── logdevice_client.h │ │ ├── logdevice_debug.cpp │ │ ├── logdevice_logsconfig.cpp │ │ ├── logdevice_logsconfig.h │ │ ├── logdevice_reader.cpp │ │ ├── logdevice_record.cpp │ │ ├── logdevice_settings.cpp │ │ ├── tests │ │ ├── test_integration.py │ │ └── test_unit.py │ │ └── util │ │ ├── CMakeLists.txt │ │ ├── util.cpp │ │ └── util.h ├── common │ ├── AbortAppendersEpochRequest.cpp │ ├── AbortAppendersEpochRequest.h │ ├── Address.h │ ├── AdminCommandTable-fwd.h │ ├── AdminCommandTable-inl.h │ ├── AdminCommandTable.cpp │ ├── AdminCommandTable.h │ ├── AllSequencers.cpp │ ├── AllSequencers.h │ ├── AppendProbeController.cpp │ ├── AppendProbeController.h │ ├── AppendRequest.cpp │ ├── AppendRequest.h │ ├── AppendRequestBase.cpp │ ├── AppendRequestBase.h │ ├── Appender.cpp │ ├── Appender.h │ ├── AppenderBuffer.cpp │ ├── AppenderBuffer.h │ ├── AppenderPrep.cpp │ ├── AppenderPrep.h │ ├── AppenderTracer.cpp │ ├── AppenderTracer.h │ ├── AtomicOptional.h │ ├── AtomicsMap.h │ ├── AuthoritativeStatus.cpp │ ├── AuthoritativeStatus.h │ ├── BWAvailableCallback.cpp │ ├── BWAvailableCallback.h │ ├── BackoffTimer.h │ ├── BatchedBufferDisposer.h │ ├── BoycottTracer.cpp │ ├── BoycottTracer.h │ ├── BucketedNodeStats.h │ ├── BuildInfo.cpp │ ├── BuildInfo.h │ ├── CMakeLists.txt │ ├── CheckNodeHealthRequest.cpp │ ├── CheckNodeHealthRequest.h │ ├── CheckSealRequest.cpp │ ├── CheckSealRequest.h │ ├── Checksum.cpp │ ├── Checksum.h │ ├── CircularBuffer.h │ ├── ClientAPIHitsTracer.cpp │ ├── ClientAPIHitsTracer.h │ ├── ClientAppendTracer.cpp │ ├── ClientAppendTracer.h │ ├── ClientBridge.h │ ├── ClientEventTracer.cpp │ ├── ClientEventTracer.h │ ├── ClientGapTracer.cpp │ ├── ClientGapTracer.h │ ├── ClientHelloInfoTracer.cpp │ ├── ClientHelloInfoTracer.h │ ├── ClientID.h │ ├── ClientIdxAllocator.cpp │ ├── ClientIdxAllocator.h │ ├── ClientReadStreamDebugInfoHandler.cpp │ ├── ClientReadStreamDebugInfoHandler.h │ ├── ClientReadTracer.cpp │ ├── ClientReadTracer.h │ ├── ClientReadersFlowTracer.cpp │ ├── ClientReadersFlowTracer.h │ ├── ClientStalledReadTracer.cpp │ ├── ClientStalledReadTracer.h │ ├── ClusterState.cpp │ ├── ClusterState.h │ ├── ClusterStateUpdatedRequest.cpp │ ├── ClusterStateUpdatedRequest.h │ ├── CompactableContainer.h │ ├── CompletionRequest.h │ ├── ConfigInit.cpp │ ├── ConfigInit.h │ ├── ConfigPermissionChecker.cpp │ ├── ConfigPermissionChecker.h │ ├── ConfigSource.h │ ├── ConfigSourceLocationParser.cpp │ ├── ConfigSourceLocationParser.h │ ├── ConfigSubscriptionHandle.cpp │ ├── ConfigurationFetchRequest.cpp │ ├── ConfigurationFetchRequest.h │ ├── ConnectThrottle.cpp │ ├── ConnectThrottle.h │ ├── Connection.cpp │ ├── Connection.h │ ├── ConnectionInfo.h │ ├── ConnectionKind.h │ ├── ConstructorFailed.h │ ├── CopySet.h │ ├── CopySetManager.cpp │ ├── CopySetManager.h │ ├── CopySetSelector.h │ ├── CopySetSelectorDependencies.cpp │ ├── CopySetSelectorDependencies.h │ ├── CopySetSelectorFactory.cpp │ ├── CopySetSelectorFactory.h │ ├── CostQueue.h │ ├── CrossDomainCopySetSelector.cpp │ ├── CrossDomainCopySetSelector.h │ ├── DRRScheduler.h │ ├── DataClass.cpp │ ├── DataClass.h │ ├── DataConfigSource.h │ ├── DataRecordFromTailRecord.cpp │ ├── DataRecordFromTailRecord.h │ ├── DataRecordOwnsPayload.cpp │ ├── DataRecordOwnsPayload.h │ ├── DataSizeRequest.cpp │ ├── DataSizeRequest.h │ ├── DeleteLogMetadataRequest.cpp │ ├── DeleteLogMetadataRequest.h │ ├── Digest.cpp │ ├── Digest.h │ ├── DistributedRequest.cpp │ ├── DistributedRequest.h │ ├── DomainIsolationChecker.cpp │ ├── DomainIsolationChecker.h │ ├── DomainIsolationUpdatedRequest.cpp │ ├── DomainIsolationUpdatedRequest.h │ ├── EBRateLimiter.h │ ├── Envelope.cpp │ ├── Envelope.h │ ├── EpochMetaData.cpp │ ├── EpochMetaData.h │ ├── EpochMetaDataCache.cpp │ ├── EpochMetaDataCache.h │ ├── EpochMetaDataMap.cpp │ ├── EpochMetaDataMap.h │ ├── EpochMetaDataUpdater.cpp │ ├── EpochMetaDataUpdater.h │ ├── EpochRecovery.cpp │ ├── EpochRecovery.h │ ├── EpochSequencer.cpp │ ├── EpochSequencer.h │ ├── EpochStore.cpp │ ├── EpochStore.h │ ├── Err.cpp │ ├── ErrorStrings.cpp │ ├── EventHandler.h │ ├── EventLoop.cpp │ ├── EventLoop.h │ ├── EventLoopTaskQueue.cpp │ ├── EventLoopTaskQueue.h │ ├── EventTracker-inl.h │ ├── EventTracker.h │ ├── ExponentialBackoffAdaptiveVariable.cpp │ ├── ExponentialBackoffAdaptiveVariable.h │ ├── ExponentialBackoffTimer.cpp │ ├── ExponentialBackoffTimer.h │ ├── FailureDomainNodeSet-inl.h │ ├── FailureDomainNodeSet.cpp │ ├── FailureDomainNodeSet.h │ ├── FileBasedVersionedConfigStore.cpp │ ├── FileBasedVersionedConfigStore.h │ ├── FileConfigSource.cpp │ ├── FileConfigSource.h │ ├── FileConfigSourceThread.cpp │ ├── FileConfigSourceThread.h │ ├── FindKeyRequest.cpp │ ├── FindKeyRequest.h │ ├── FindKeyTracer.cpp │ ├── FindKeyTracer.h │ ├── FireAndForgetRequest.cpp │ ├── FireAndForgetRequest.h │ ├── FlowGroup.cpp │ ├── FlowGroup.h │ ├── FlowGroupDependencies.h │ ├── FlowMeter.h │ ├── GetClusterStateRequest.cpp │ ├── GetClusterStateRequest.h │ ├── GetEpochRecoveryMetadataRequest.cpp │ ├── GetEpochRecoveryMetadataRequest.h │ ├── GetHeadAttributesRequest.cpp │ ├── GetHeadAttributesRequest.h │ ├── GetLogInfoFromNodeRequest.cpp │ ├── GetLogInfoFromNodeRequest.h │ ├── GetLogInfoRequest.cpp │ ├── GetLogInfoRequest.h │ ├── GetLogInfoRequestSharedState.cpp │ ├── GetLogInfoRequestSharedState.h │ ├── GetRsmSnapshotRequest.cpp │ ├── GetRsmSnapshotRequest.h │ ├── GetSeqStateRequest-fwd.h │ ├── GetSeqStateRequest.cpp │ ├── GetSeqStateRequest.h │ ├── GetTrimPointRequest.cpp │ ├── GetTrimPointRequest.h │ ├── GraylistingTracker.cpp │ ├── GraylistingTracker.h │ ├── HELLOPrincipalParser.cpp │ ├── HELLOPrincipalParser.h │ ├── HashBasedSequencerLocator.cpp │ ├── HashBasedSequencerLocator.h │ ├── IProtocolHandler.h │ ├── InternalAppendRequest.cpp │ ├── InternalAppendRequest.h │ ├── IntrusiveUnorderedMap.h │ ├── LegacyLogToShard.h │ ├── LibeventTimer.cpp │ ├── LibeventTimer.h │ ├── LifoEventSem.cpp │ ├── LifoEventSem.h │ ├── LinearCopySetSelector.cpp │ ├── LinearCopySetSelector.h │ ├── LocalLogStoreRecordFormat.cpp │ ├── LocalLogStoreRecordFormat.h │ ├── LogIDUniqueQueue.h │ ├── LogRecoveryRequest.cpp │ ├── LogRecoveryRequest.h │ ├── LogsConfigApiRequest.cpp │ ├── LogsConfigApiRequest.h │ ├── LogsConfigRequestOrigin.h │ ├── LogsConfigUpdatedRequest.cpp │ ├── LogsConfigUpdatedRequest.h │ ├── MPSCQueue.h │ ├── MetaDataLog.h │ ├── MetaDataLogReader.cpp │ ├── MetaDataLogReader.h │ ├── MetaDataLogTrimmer.cpp │ ├── MetaDataLogTrimmer.h │ ├── MetaDataLogWriter.cpp │ ├── MetaDataLogWriter.h │ ├── MetaDataTracer.cpp │ ├── MetaDataTracer.h │ ├── MetaSequencer.cpp │ ├── MetaSequencer.h │ ├── Metadata.cpp │ ├── Metadata.h │ ├── ModuleRegistry.cpp │ ├── ModuleRegistry.h │ ├── Mutator.cpp │ ├── Mutator.h │ ├── NetworkDependencies.cpp │ ├── NetworkDependencies.h │ ├── NodeAvailabilityChecker.cpp │ ├── NodeAvailabilityChecker.h │ ├── NodeHealthStats.h │ ├── NodeHealthStatus.cpp │ ├── NodeHealthStatus.h │ ├── NodeID.h │ ├── NodeLocationHierarchy.cpp │ ├── NodeLocationHierarchy.h │ ├── NodeSetAccessor.cpp │ ├── NodeSetAccessor.h │ ├── NodeSetFinder.cpp │ ├── NodeSetFinder.h │ ├── NodeSetState.cpp │ ├── NodeSetState.h │ ├── NodesConfigurationInit.cpp │ ├── NodesConfigurationInit.h │ ├── NodesConfigurationPoller.cpp │ ├── NodesConfigurationPoller.h │ ├── NodesConfigurationUpdatedRequest.cpp │ ├── NodesConfigurationUpdatedRequest.h │ ├── NoopTraceLogger.cpp │ ├── NoopTraceLogger.h │ ├── NwShapingFlowGroupDeps.cpp │ ├── ObjectPoller-inl.h │ ├── ObjectPoller.h │ ├── OffsetMap.cpp │ ├── OffsetMap.h │ ├── OutlierDetection.h │ ├── PThread.cpp │ ├── PThread.h │ ├── PassThroughCopySetManager.h │ ├── PayloadGroupCodec.cpp │ ├── PayloadGroupCodec.h │ ├── PayloadHolder.cpp │ ├── PayloadHolder.h │ ├── PeriodicReleases.cpp │ ├── PeriodicReleases.h │ ├── PermissionChecker.cpp │ ├── PermissionChecker.h │ ├── PrincipalIdentity.cpp │ ├── PrincipalIdentity.h │ ├── Priority.h │ ├── PriorityMap.cpp │ ├── PriorityMap.h │ ├── PriorityQueue.h │ ├── Processor.cpp │ ├── Processor.h │ ├── ProtocolHandler.cpp │ ├── ProtocolHandler.h │ ├── PurgingTracer.cpp │ ├── PurgingTracer.h │ ├── RSMBasedVersionedConfigStore.cpp │ ├── RSMBasedVersionedConfigStore.h │ ├── Random.cpp │ ├── Random.h │ ├── RandomAccessQueue.h │ ├── RandomLinearIteratorBase.h │ ├── RandomNodeSelector.cpp │ ├── RandomNodeSelector.h │ ├── RateEstimator.cpp │ ├── RateEstimator.h │ ├── RateLimiter.cpp │ ├── RateLimiter.h │ ├── RawDataRecord.h │ ├── ReadStreamAttributes.h │ ├── ReadStreamDebugInfoSamplingConfig.cpp │ ├── ReadStreamDebugInfoSamplingConfig.h │ ├── ReadStreamsBufferedBytesRequest.cpp │ ├── ReadStreamsBufferedBytesRequest.h │ ├── ReaderImpl.cpp │ ├── ReaderImpl.h │ ├── ReaderProgressRequest.cpp │ ├── ReaderProgressRequest.h │ ├── RebuildingTracer.cpp │ ├── RebuildingTracer.h │ ├── RebuildingTypes.cpp │ ├── RebuildingTypes.h │ ├── Recipient.cpp │ ├── Recipient.h │ ├── RecipientSet.cpp │ ├── RecipientSet.h │ ├── Record.cpp │ ├── RecordID.h │ ├── RecordOffset.cpp │ ├── RecoveryNode.cpp │ ├── RecoveryNode.h │ ├── RecoverySet.cpp │ ├── RecoverySet.h │ ├── Request.cpp │ ├── Request.h │ ├── RequestExecutor.cpp │ ├── RequestExecutor.h │ ├── RequestPump.cpp │ ├── RequestPump.h │ ├── RequestType.cpp │ ├── RequestType.h │ ├── ResourceBudget.h │ ├── ResumeReadingRequest.cpp │ ├── ResumeReadingRequest.h │ ├── RetryHandler.cpp │ ├── RetryHandler.h │ ├── RunContext.h │ ├── SCDCopysetReordering.h │ ├── SSLFetcher.cpp │ ├── SSLFetcher.h │ ├── SSLPrincipalParser.h │ ├── SSLSessionCache.cpp │ ├── SSLSessionCache.h │ ├── SampledTracer.h │ ├── Sampling.cpp │ ├── Sampling.h │ ├── Seal.h │ ├── SecurityInformation.cpp │ ├── SecurityInformation.h │ ├── SecurityTracer.cpp │ ├── SecurityTracer.h │ ├── Semaphore.h │ ├── Sender.cpp │ ├── Sender.h │ ├── Sequencer.cpp │ ├── Sequencer.h │ ├── SequencerBackgroundActivator.cpp │ ├── SequencerBackgroundActivator.h │ ├── SequencerBatching.cpp │ ├── SequencerBatching.h │ ├── SequencerLocator.h │ ├── SequencerMetaDataLogManager.cpp │ ├── SequencerMetaDataLogManager.h │ ├── SequencerPlacement.h │ ├── SequencerRouter.cpp │ ├── SequencerRouter.h │ ├── SerializableData.cpp │ ├── SerializableData.h │ ├── ServerConfigUpdatedRequest.cpp │ ├── ServerConfigUpdatedRequest.h │ ├── ServerRecordFilter.h │ ├── ShapingContainer.h │ ├── ShardAuthoritativeStatusMap.cpp │ ├── ShardAuthoritativeStatusMap.h │ ├── ShardID.h │ ├── SimpleEnumMap.h │ ├── SingleEvent.h │ ├── SlidingWindow.h │ ├── SlidingWindowSingleEpoch.h │ ├── SlowStorageTasksTracer.cpp │ ├── SlowStorageTasksTracer.h │ ├── SmallMap.h │ ├── SnapshotStoreTypes.h │ ├── Sockaddr.cpp │ ├── Sockaddr.h │ ├── SocketCallback.h │ ├── SocketNetworkDependencies.cpp │ ├── SocketNetworkDependencies.h │ ├── SocketSender.cpp │ ├── SocketSender.h │ ├── SocketTypes.cpp │ ├── SocketTypes.h │ ├── StartReadingRequest.cpp │ ├── StartReadingRequest.h │ ├── StaticSequencerLocator.h │ ├── StaticSequencerPlacement.h │ ├── StatsCollectionThread.cpp │ ├── StatsCollectionThread.h │ ├── StatsPublisher.h │ ├── StickyCopySetManager.cpp │ ├── StickyCopySetManager.h │ ├── StopReadingRequest.cpp │ ├── StopReadingRequest.h │ ├── StorageTask-enums.cpp │ ├── StorageTask-enums.h │ ├── StorageTaskDebugInfo.h │ ├── StreamAppendRequest.cpp │ ├── StreamAppendRequest.h │ ├── StreamWriterAppendSink.cpp │ ├── StreamWriterAppendSink.h │ ├── SyncSequencerRequest.cpp │ ├── SyncSequencerRequest.h │ ├── TLSCredMonitor.cpp │ ├── TLSCredMonitor.h │ ├── TailRecord.cpp │ ├── TailRecord.h │ ├── Thread.cpp │ ├── Thread.h │ ├── ThreadID.cpp │ ├── ThreadID.h │ ├── ThriftCodec.h │ ├── ThriftCommonStructConverter.cpp │ ├── ThriftCommonStructConverter.h │ ├── ThrottledTracer.h │ ├── Timer.cpp │ ├── Timer.h │ ├── TimerInterface.h │ ├── Timestamp.cpp │ ├── Timestamp.h │ ├── TraceLogger.h │ ├── TraceSample.cpp │ ├── TraceSample.h │ ├── TrafficShaper.cpp │ ├── TrafficShaper.h │ ├── TrimRequest.cpp │ ├── TrimRequest.h │ ├── Types.cpp │ ├── UnorderedMapWithLRU.h │ ├── UpdateableSecurityInfo.cpp │ ├── UpdateableSecurityInfo.h │ ├── UpdateableSharedPtr.h │ ├── VersionedConfigStore.cpp │ ├── VersionedConfigStore.h │ ├── WeakRefHolder.h │ ├── WeightedCopySetSelector.cpp │ ├── WeightedCopySetSelector.h │ ├── WheelTimer.cpp │ ├── WheelTimer.h │ ├── Worker.cpp │ ├── Worker.h │ ├── WorkerCallbackHelper.cpp │ ├── WorkerCallbackHelper.h │ ├── WorkerLoadBalancing.cpp │ ├── WorkerLoadBalancing.h │ ├── WorkerTimeoutStats.cpp │ ├── WorkerTimeoutStats.h │ ├── WorkerType.cpp │ ├── WorkerType.h │ ├── WriteMetaDataLogRequest.cpp │ ├── WriteMetaDataLogRequest.h │ ├── WriteMetaDataRecord.cpp │ ├── WriteMetaDataRecord.h │ ├── ZeroCopiedRecord.cpp │ ├── ZeroCopiedRecord.h │ ├── ZookeeperClient.cpp │ ├── ZookeeperClient.h │ ├── ZookeeperClientBase.cpp │ ├── ZookeeperClientBase.h │ ├── ZookeeperClientFactoryProd.cpp │ ├── ZookeeperClientFactoryProd.h │ ├── ZookeeperVersionedConfigStore.cpp │ ├── ZookeeperVersionedConfigStore.h │ ├── buffered_writer │ │ ├── BufferedWriteCodec.cpp │ │ ├── BufferedWriteCodec.h │ │ ├── BufferedWriteDecoderImpl.cpp │ │ ├── BufferedWriteDecoderImpl.h │ │ ├── BufferedWriterImpl.cpp │ │ ├── BufferedWriterImpl.h │ │ ├── BufferedWriterOptionsUtil.cpp │ │ ├── BufferedWriterOptionsUtil.h │ │ ├── BufferedWriterShard.cpp │ │ ├── BufferedWriterShard.h │ │ ├── BufferedWriterSingleLog.cpp │ │ └── BufferedWriterSingleLog.h │ ├── checks.h │ ├── chrono_util.h │ ├── client_read_stream │ │ ├── AllClientReadStreams.cpp │ │ ├── AllClientReadStreams.h │ │ ├── ClientReadStream.cpp │ │ ├── ClientReadStream.h │ │ ├── ClientReadStreamBuffer.h │ │ ├── ClientReadStreamBufferFactory.h │ │ ├── ClientReadStreamCircularBuffer.cpp │ │ ├── ClientReadStreamCircularBuffer.h │ │ ├── ClientReadStreamConnectionHealth.cpp │ │ ├── ClientReadStreamConnectionHealth.h │ │ ├── ClientReadStreamFailureDetector.cpp │ │ ├── ClientReadStreamFailureDetector.h │ │ ├── ClientReadStreamOrderedMapBuffer.cpp │ │ ├── ClientReadStreamOrderedMapBuffer.h │ │ ├── ClientReadStreamScd.cpp │ │ ├── ClientReadStreamScd.h │ │ ├── ClientReadStreamSenderState.cpp │ │ ├── ClientReadStreamSenderState.h │ │ ├── RewindScheduler.cpp │ │ └── RewindScheduler.h │ ├── commandline_util.h │ ├── commandline_util_chrono-inl.h │ ├── commandline_util_chrono.h │ ├── commandline_util_shard_id.h │ ├── config.h │ ├── configuration │ │ ├── ConfigParser.cpp │ │ ├── ConfigParser.h │ │ ├── ConfigUpdater.h │ │ ├── Configuration.cpp │ │ ├── Configuration.h │ │ ├── EpochMetaDataVersion.cpp │ │ ├── EpochMetaDataVersion.h │ │ ├── FlowGroupPolicy.cpp │ │ ├── FlowGroupPolicy.h │ │ ├── InternalLogs.cpp │ │ ├── InternalLogs.h │ │ ├── LocalLogsConfig.cpp │ │ ├── LocalLogsConfig.h │ │ ├── LocalLogsConfigIterator.h │ │ ├── LogsConfig.cpp │ │ ├── LogsConfig.h │ │ ├── LogsConfigParser.cpp │ │ ├── LogsConfigParser.h │ │ ├── MetaDataLogsConfig.h │ │ ├── Node.cpp │ │ ├── Node.h │ │ ├── NodeLocation.cpp │ │ ├── NodeLocation.h │ │ ├── ParsingHelpers.cpp │ │ ├── ParsingHelpers.h │ │ ├── PrincipalsConfig.cpp │ │ ├── PrincipalsConfig.h │ │ ├── ReplicationProperty.cpp │ │ ├── ReplicationProperty.h │ │ ├── SecurityConfig.cpp │ │ ├── SecurityConfig.h │ │ ├── SequencersConfig.h │ │ ├── ServerConfig.cpp │ │ ├── ServerConfig.h │ │ ├── ShapingConfig.cpp │ │ ├── ShapingConfig.h │ │ ├── TextConfigUpdater.cpp │ │ ├── TextConfigUpdater.h │ │ ├── TrafficClass.cpp │ │ ├── TrafficClass.h │ │ ├── TrafficShapingConfig.cpp │ │ ├── TrafficShapingConfig.h │ │ ├── UpdateableConfig.cpp │ │ ├── UpdateableConfig.h │ │ ├── UpdateableConfigTmpl.cpp │ │ ├── UpdateableConfigTmpl.h │ │ ├── ZookeeperConfig.cpp │ │ ├── ZookeeperConfig.h │ │ ├── ZookeeperConfigSource.cpp │ │ ├── ZookeeperConfigSource.h │ │ ├── if │ │ │ ├── AllReadStreamsDebugConfig.thrift │ │ │ └── CMakeLists.txt │ │ ├── logs │ │ │ ├── CodecType.h │ │ │ ├── DefaultLogAttributes.h │ │ │ ├── FBuffersLogsConfigCodec.h │ │ │ ├── FBuffersLogsConfigDecoder-inl.h │ │ │ ├── FBuffersLogsConfigDecoder.cpp │ │ │ ├── FBuffersLogsConfigEncoder-inl.h │ │ │ ├── FBuffersLogsConfigEncoder.cpp │ │ │ ├── LogsConfigApiTracer.cpp │ │ │ ├── LogsConfigApiTracer.h │ │ │ ├── LogsConfigCodec.h │ │ │ ├── LogsConfigDeltaTypes.cpp │ │ │ ├── LogsConfigDeltaTypes.h │ │ │ ├── LogsConfigManager.cpp │ │ │ ├── LogsConfigManager.h │ │ │ ├── LogsConfigStateMachine.cpp │ │ │ ├── LogsConfigStateMachine.h │ │ │ ├── LogsConfigStructures.fbs │ │ │ ├── LogsConfigStructures_generated.h │ │ │ ├── LogsConfigTree.cpp │ │ │ ├── LogsConfigTree.h │ │ │ ├── delta_types.inc │ │ │ ├── flatbuffers_type_mapping.inc │ │ │ └── if │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── logsconfig.thrift │ │ ├── nodes │ │ │ ├── CMakeLists.txt │ │ │ ├── FileBasedNodesConfigurationStore.h │ │ │ ├── MetaDataLogsReplication.cpp │ │ │ ├── MetaDataLogsReplication.h │ │ │ ├── NodeAttributesConfig-inl.h │ │ │ ├── NodeAttributesConfig.h │ │ │ ├── NodeIndicesAllocator.cpp │ │ │ ├── NodeIndicesAllocator.h │ │ │ ├── NodeRole.cpp │ │ │ ├── NodeRole.h │ │ │ ├── NodeUpdateBuilder.cpp │ │ │ ├── NodeUpdateBuilder.h │ │ │ ├── NodesConfiguration.cpp │ │ │ ├── NodesConfiguration.h │ │ │ ├── NodesConfiguration.thrift │ │ │ ├── NodesConfigurationAPI.h │ │ │ ├── NodesConfigurationCodec.cpp │ │ │ ├── NodesConfigurationCodec.h │ │ │ ├── NodesConfigurationManager.cpp │ │ │ ├── NodesConfigurationManager.h │ │ │ ├── NodesConfigurationManagerDependencies.cpp │ │ │ ├── NodesConfigurationManagerDependencies.h │ │ │ ├── NodesConfigurationManagerFactory.cpp │ │ │ ├── NodesConfigurationManagerFactory.h │ │ │ ├── NodesConfigurationStore.h │ │ │ ├── NodesConfigurationTracer.cpp │ │ │ ├── NodesConfigurationTracer.h │ │ │ ├── PerRoleConfig.h │ │ │ ├── SequencerConfig.cpp │ │ │ ├── SequencerConfig.h │ │ │ ├── ServerAddressRouter.cpp │ │ │ ├── ServerAddressRouter.h │ │ │ ├── ServerBasedNodesConfigurationStore.cpp │ │ │ ├── ServerBasedNodesConfigurationStore.h │ │ │ ├── ServiceDiscoveryConfig.cpp │ │ │ ├── ServiceDiscoveryConfig.h │ │ │ ├── ShardStateTracker.cpp │ │ │ ├── ShardStateTracker.h │ │ │ ├── StorageConfig.cpp │ │ │ ├── StorageConfig.h │ │ │ ├── ZookeeperNodesConfigurationStore.h │ │ │ ├── test │ │ │ │ └── ServerAddressRouterTest.cpp │ │ │ ├── utils.cpp │ │ │ └── utils.h │ │ └── utils │ │ │ ├── CMakeLists.txt │ │ │ ├── ConfigurationCodec-inl.h │ │ │ ├── ConfigurationCodec.h │ │ │ └── ConfigurationCodec.thrift │ ├── data_classes.inc │ ├── debug.cpp │ ├── debug.h │ ├── event_log │ │ ├── EventLogRebuildingSet.cpp │ │ ├── EventLogRebuildingSet.fbs │ │ ├── EventLogRebuildingSet.h │ │ ├── EventLogRebuildingSetCodec.cpp │ │ ├── EventLogRebuildingSetCodec.h │ │ ├── EventLogRebuildingSet_generated.h │ │ ├── EventLogRecord-inl.h │ │ ├── EventLogRecord.cpp │ │ ├── EventLogRecord.h │ │ ├── EventLogStateMachine.cpp │ │ ├── EventLogStateMachine.h │ │ ├── EventLogWriter.cpp │ │ └── EventLogWriter.h │ ├── hash.cpp │ ├── hash.h │ ├── if │ │ ├── ApiModel.thrift │ │ ├── ApiService.thrift │ │ ├── CMakeLists.txt │ │ ├── common.thrift │ │ ├── for_open_source │ │ │ └── common │ │ │ │ └── fb303 │ │ │ │ └── if │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── fb303.thrift │ │ └── payload.thrift │ ├── libevent │ │ ├── EvBaseWithFolly.cpp │ │ ├── EvBaseWithFolly.h │ │ ├── EvTimerWithFolly.cpp │ │ ├── EvTimerWithFolly.h │ │ ├── EventWithFolly.h │ │ ├── IEvBase.cpp │ │ ├── IEvBase.h │ │ ├── LibEventCompatibility.cpp │ │ ├── LibEventCompatibility.h │ │ └── test │ │ │ ├── EvBaseMock.h │ │ │ └── EvBaseTest.cpp │ ├── log_metadata_type.inc │ ├── membership │ │ ├── CMakeLists.txt │ │ ├── Membership.h │ │ ├── Membership.thrift │ │ ├── MembershipThriftConverter.cpp │ │ ├── MembershipThriftConverter.h │ │ ├── SequencerMembership.cpp │ │ ├── SequencerMembership.h │ │ ├── StorageMembership.cpp │ │ ├── StorageMembership.h │ │ ├── StorageState.h │ │ ├── StorageStateTransitions.h │ │ ├── types.h │ │ ├── utils.cpp │ │ └── utils.h │ ├── message_types.inc │ ├── metadata_log │ │ ├── TrimDataLogRequest.cpp │ │ ├── TrimDataLogRequest.h │ │ ├── TrimMetaDataLogRequest.cpp │ │ └── TrimMetaDataLogRequest.h │ ├── network │ │ ├── AsyncSocketAdapter.cpp │ │ ├── AsyncSocketAdapter.h │ │ ├── AsyncSocketConnectionFactory.cpp │ │ ├── AsyncSocketConnectionFactory.h │ │ ├── IConnectionFactory.h │ │ ├── LinuxNetUtils.cpp │ │ ├── LinuxNetUtils.h │ │ ├── MessageReader.cpp │ │ ├── MessageReader.h │ │ ├── NetworkWorkContext.cpp │ │ ├── NetworkWorkContext.h │ │ ├── OverloadDetector.cpp │ │ ├── OverloadDetector.h │ │ ├── SessionInjectorCallback.cpp │ │ ├── SessionInjectorCallback.h │ │ ├── SocketAdapter.h │ │ ├── SocketConnectCallback.cpp │ │ ├── SocketConnectCallback.h │ │ ├── SocketWriteCallback.h │ │ └── test │ │ │ └── ConnectionFactoryTest.cpp │ ├── nodeset_selection │ │ ├── NodeSetSelector.h │ │ ├── NodeSetSelectorFactory.cpp │ │ ├── NodeSetSelectorFactory.h │ │ ├── NodeSetSelectorType.h │ │ ├── PickCurrentNodeSetSelector.h │ │ ├── RandomCrossDomainNodeSetSelector.cpp │ │ ├── RandomCrossDomainNodeSetSelector.h │ │ ├── RandomNodeSetSelector.cpp │ │ ├── RandomNodeSetSelector.h │ │ ├── SelectAllNodeSetSelector.h │ │ ├── SelectAllShardsNodeSetSelector.h │ │ ├── WeightAwareNodeSetSelector.cpp │ │ └── WeightAwareNodeSetSelector.h │ ├── plugin │ │ ├── BacktraceRunner.h │ │ ├── BuiltinClientDefaultSettingsProvider.h │ │ ├── BuiltinConfigSourceFactory.cpp │ │ ├── BuiltinConfigSourceFactory.h │ │ ├── BuiltinPermissionCheckerFactory.cpp │ │ ├── BuiltinPermissionCheckerFactory.h │ │ ├── BuiltinThriftClientFactoryPlugin.h │ │ ├── BuiltinZookeeperClientFactory.cpp │ │ ├── BuiltinZookeeperClientFactory.h │ │ ├── CommonBuiltinPlugins.h │ │ ├── ConfigSourceFactory.h │ │ ├── DefaultSettingsProvider.h │ │ ├── DynamicPluginLoader.cpp │ │ ├── DynamicPluginLoader.h │ │ ├── HotTextOptimizerPlugin.h │ │ ├── LocationProvider.h │ │ ├── Logger.h │ │ ├── PermissionCheckerFactory.h │ │ ├── Plugin.h │ │ ├── PluginProvider.h │ │ ├── PluginRegistry.cpp │ │ ├── PluginRegistry.h │ │ ├── PluginType.cpp │ │ ├── PluginType.h │ │ ├── SSLPrincipalParserFactory.h │ │ ├── SequencerLocatorFactory.h │ │ ├── StaticPluginLoader.cpp │ │ ├── StaticPluginLoader.h │ │ ├── StatsPublisherFactory.h │ │ ├── ThriftClientFactoryPlugin.h │ │ ├── ThriftServerFactory.h │ │ ├── TraceLoggerFactory.h │ │ ├── ZookeeperClientFactory.h │ │ ├── plugin_types.inc │ │ └── test │ │ │ ├── DummyLoggerPlugin.cpp │ │ │ ├── DummyLoggerPlugin.h │ │ │ └── DynamicPluginLoaderTest.cpp │ ├── priorities.inc │ ├── protocol │ │ ├── ACK_Message.cpp │ │ ├── ACK_Message.h │ │ ├── APPENDED_Message.cpp │ │ ├── APPENDED_Message.h │ │ ├── APPEND_Message.cpp │ │ ├── APPEND_Message.h │ │ ├── APPEND_PROBE_Message.cpp │ │ ├── APPEND_PROBE_Message.h │ │ ├── APPEND_PROBE_REPLY_Message.cpp │ │ ├── APPEND_PROBE_REPLY_Message.h │ │ ├── CHECK_NODE_HEALTH_Message.cpp │ │ ├── CHECK_NODE_HEALTH_Message.h │ │ ├── CHECK_NODE_HEALTH_REPLY_Message.cpp │ │ ├── CHECK_NODE_HEALTH_REPLY_Message.h │ │ ├── CHECK_SEAL_Message.cpp │ │ ├── CHECK_SEAL_Message.h │ │ ├── CHECK_SEAL_REPLY_Message.cpp │ │ ├── CHECK_SEAL_REPLY_Message.h │ │ ├── CLEANED_Message.cpp │ │ ├── CLEANED_Message.h │ │ ├── CLEAN_Message.cpp │ │ ├── CLEAN_Message.h │ │ ├── CONFIG_CHANGED_Message.cpp │ │ ├── CONFIG_CHANGED_Message.h │ │ ├── CONFIG_FETCH_Message.cpp │ │ ├── CONFIG_FETCH_Message.h │ │ ├── Compatibility.h │ │ ├── DATA_SIZE_Message.cpp │ │ ├── DATA_SIZE_Message.h │ │ ├── DATA_SIZE_REPLY_Message.cpp │ │ ├── DATA_SIZE_REPLY_Message.h │ │ ├── DELETE_LOG_METADATA_Message.cpp │ │ ├── DELETE_LOG_METADATA_Message.h │ │ ├── DELETE_LOG_METADATA_REPLY_Message.cpp │ │ ├── DELETE_LOG_METADATA_REPLY_Message.h │ │ ├── DELETE_Message.cpp │ │ ├── DELETE_Message.h │ │ ├── FINDKEY_Message.cpp │ │ ├── FINDKEY_Message.h │ │ ├── FINDKEY_REPLY_Message.cpp │ │ ├── FINDKEY_REPLY_Message.h │ │ ├── FixedSizeMessage.h │ │ ├── GAP_Message.cpp │ │ ├── GAP_Message.h │ │ ├── GET_CLUSTER_STATE_Message.cpp │ │ ├── GET_CLUSTER_STATE_Message.h │ │ ├── GET_CLUSTER_STATE_REPLY_Message.cpp │ │ ├── GET_CLUSTER_STATE_REPLY_Message.h │ │ ├── GET_EPOCH_RECOVERY_METADATA_Message.cpp │ │ ├── GET_EPOCH_RECOVERY_METADATA_Message.h │ │ ├── GET_EPOCH_RECOVERY_METADATA_REPLY_Message.cpp │ │ ├── GET_EPOCH_RECOVERY_METADATA_REPLY_Message.h │ │ ├── GET_HEAD_ATTRIBUTES_Message.cpp │ │ ├── GET_HEAD_ATTRIBUTES_Message.h │ │ ├── GET_HEAD_ATTRIBUTES_REPLY_Message.cpp │ │ ├── GET_HEAD_ATTRIBUTES_REPLY_Message.h │ │ ├── GET_RSM_SNAPSHOT_Message.cpp │ │ ├── GET_RSM_SNAPSHOT_Message.h │ │ ├── GET_RSM_SNAPSHOT_REPLY_Message.cpp │ │ ├── GET_RSM_SNAPSHOT_REPLY_Message.h │ │ ├── GET_SEQ_STATE_Message.cpp │ │ ├── GET_SEQ_STATE_Message.h │ │ ├── GET_SEQ_STATE_REPLY_Message.cpp │ │ ├── GET_SEQ_STATE_REPLY_Message.h │ │ ├── GET_TRIM_POINT_Message.cpp │ │ ├── GET_TRIM_POINT_Message.h │ │ ├── GET_TRIM_POINT_REPLY_Message.cpp │ │ ├── GET_TRIM_POINT_REPLY_Message.h │ │ ├── GOSSIP_Message.cpp │ │ ├── GOSSIP_Message.h │ │ ├── HELLO_Message.cpp │ │ ├── HELLO_Message.h │ │ ├── LOGS_CONFIG_API_Message.cpp │ │ ├── LOGS_CONFIG_API_Message.h │ │ ├── LOGS_CONFIG_API_REPLY_Message.cpp │ │ ├── LOGS_CONFIG_API_REPLY_Message.h │ │ ├── MEMTABLE_FLUSHED_Message.cpp │ │ ├── MEMTABLE_FLUSHED_Message.h │ │ ├── MUTATED_Message.cpp │ │ ├── MUTATED_Message.h │ │ ├── Message.cpp │ │ ├── Message.h │ │ ├── MessageDeserializers.cpp │ │ ├── MessageDeserializers.h │ │ ├── MessageDispatch.cpp │ │ ├── MessageDispatch.h │ │ ├── MessageReadResult.cpp │ │ ├── MessageReadResult.h │ │ ├── MessageTracer.cpp │ │ ├── MessageTracer.h │ │ ├── MessageType.h │ │ ├── MessageTypeNames.cpp │ │ ├── MessageTypeNames.h │ │ ├── NODE_STATS_AGGREGATE_Message.cpp │ │ ├── NODE_STATS_AGGREGATE_Message.h │ │ ├── NODE_STATS_AGGREGATE_REPLY_Message.cpp │ │ ├── NODE_STATS_AGGREGATE_REPLY_Message.h │ │ ├── NODE_STATS_Message.cpp │ │ ├── NODE_STATS_Message.h │ │ ├── NODE_STATS_REPLY_Message.cpp │ │ ├── NODE_STATS_REPLY_Message.h │ │ ├── ProtocolHeader.cpp │ │ ├── ProtocolHeader.h │ │ ├── ProtocolReader.cpp │ │ ├── ProtocolReader.h │ │ ├── ProtocolWriter.cpp │ │ ├── ProtocolWriter.h │ │ ├── RECORD_Message.cpp │ │ ├── RECORD_Message.h │ │ ├── RELEASE_Message.cpp │ │ ├── RELEASE_Message.h │ │ ├── SEALED_Message.cpp │ │ ├── SEALED_Message.h │ │ ├── SEAL_Message.cpp │ │ ├── SEAL_Message.h │ │ ├── SHARD_STATUS_UPDATE_Message.cpp │ │ ├── SHARD_STATUS_UPDATE_Message.h │ │ ├── SHUTDOWN_Message.cpp │ │ ├── SHUTDOWN_Message.h │ │ ├── STARTED_Message.cpp │ │ ├── STARTED_Message.h │ │ ├── START_Message.cpp │ │ ├── START_Message.h │ │ ├── STOP_Message.cpp │ │ ├── STOP_Message.h │ │ ├── STORED_Message.cpp │ │ ├── STORED_Message.h │ │ ├── STORE_Message.cpp │ │ ├── STORE_Message.h │ │ ├── SimpleMessage.h │ │ ├── TEST_Message.cpp │ │ ├── TEST_Message.h │ │ ├── TRIMMED_Message.cpp │ │ ├── TRIMMED_Message.h │ │ ├── TRIM_Message.cpp │ │ ├── TRIM_Message.h │ │ ├── WINDOW_Message.cpp │ │ └── WINDOW_Message.h │ ├── replicated_state_machine │ │ ├── KeyValueStoreStateMachine.cpp │ │ ├── KeyValueStoreStateMachine.h │ │ ├── LogBasedRSMSnapshotStore.cpp │ │ ├── LogBasedRSMSnapshotStore.h │ │ ├── MessageBasedRSMSnapshotStore.cpp │ │ ├── MessageBasedRSMSnapshotStore.h │ │ ├── RSMSnapshotHeader.cpp │ │ ├── RSMSnapshotHeader.h │ │ ├── RSMSnapshotStore.h │ │ ├── ReplicatedStateMachine-enum.cpp │ │ ├── ReplicatedStateMachine-enum.h │ │ ├── ReplicatedStateMachine-inl.h │ │ ├── ReplicatedStateMachine.h │ │ ├── RsmSnapshotStoreFactory.h │ │ ├── RsmVersionTypes.h │ │ ├── TrimRSMRequest.cpp │ │ ├── TrimRSMRequest.h │ │ ├── TrimRSMRetryHandler.cpp │ │ ├── TrimRSMRetryHandler.h │ │ ├── if │ │ │ ├── CMakeLists.txt │ │ │ └── KeyValueStore.thrift │ │ ├── logging.h │ │ └── rsm_types.inc │ ├── request_types.inc │ ├── request_util.cpp │ ├── request_util.h │ ├── sequencer_boycotting │ │ ├── Boycott.h │ │ ├── BoycottAdaptiveDuration.cpp │ │ └── BoycottAdaptiveDuration.h │ ├── settings │ │ ├── ClientReadStreamFailureDetectorSettings.h │ │ ├── Durability.cpp │ │ ├── Durability.h │ │ ├── GossipSettings.cpp │ │ ├── GossipSettings.h │ │ ├── RebuildingSettings.cpp │ │ ├── RebuildingSettings.h │ │ ├── SSLSettingValidation.cpp │ │ ├── SSLSettingValidation.h │ │ ├── SequencerBoycottingSettings.cpp │ │ ├── SequencerBoycottingSettings.h │ │ ├── Settings.cpp │ │ ├── Settings.h │ │ ├── SettingsUpdater.cpp │ │ ├── SettingsUpdater.h │ │ ├── UpdateableSettings-details.h │ │ ├── UpdateableSettings.cpp │ │ ├── UpdateableSettings.h │ │ ├── Validators.cpp │ │ ├── Validators.h │ │ ├── durability.inc │ │ └── util.h │ ├── stats │ │ ├── ClientHistograms.h │ │ ├── Histogram.cpp │ │ ├── Histogram.h │ │ ├── HistogramBundle.h │ │ ├── PerMonitoringTagHistograms.h │ │ ├── PerShardHistograms.h │ │ ├── ServerHistograms.h │ │ ├── Stats.cpp │ │ ├── Stats.h │ │ ├── StatsCounter.h │ │ ├── admin_stats.inc │ │ ├── characterize_load_stats.inc │ │ ├── client_stats.inc │ │ ├── common_stats.inc │ │ ├── ldbench_worker_stats.inc │ │ ├── per_flow_group_stats.inc │ │ ├── per_log_stats.inc │ │ ├── per_log_time_series.inc │ │ ├── per_message_type_stats.inc │ │ ├── per_monitoring_tag_stats.inc │ │ ├── per_msg_priority_stats.inc │ │ ├── per_priority_stats_common.inc │ │ ├── per_request_type_stats.inc │ │ ├── per_shard_stats.inc │ │ ├── per_storage_task_type_stats.inc │ │ ├── per_traffic_class_stats.inc │ │ └── server_stats.inc │ ├── storage_task_principals.inc │ ├── storage_task_priorities.inc │ ├── storage_task_types.inc │ ├── test │ │ ├── APPEND_MessageTest.cpp │ │ ├── AllSequencersTest.cpp │ │ ├── AppendProbeControllerTest.cpp │ │ ├── AppendRequestTest.cpp │ │ ├── AppenderTest.cpp │ │ ├── BoycottAdaptiveDurationTest.cpp │ │ ├── BufferedWriteCodecTest.cpp │ │ ├── BufferedWriterTest.cpp │ │ ├── CONFIG_CHANGED_MessageTest.cpp │ │ ├── CONFIG_FETCH_MessageTest.cpp │ │ ├── CheckNodeHealthRequestTest.cpp │ │ ├── ChecksumTest.cpp │ │ ├── CircularBufferTest.cpp │ │ ├── ClientIdxAllocatorTest.cpp │ │ ├── ClientReadStreamBufferTest.cpp │ │ ├── ClientReadStreamDebugInfoHandlerTest.cpp │ │ ├── ClientReadStreamFailureDetectorTest.cpp │ │ ├── ClientReadStreamScd_FilteredOutTest.cpp │ │ ├── ClientReadStreamTest.cpp │ │ ├── ClusterStateTest.cpp │ │ ├── CommandLineUtilChronoTest.cpp │ │ ├── CompactableContainerTest.cpp │ │ ├── ConfigSourceLocationParserTest.cpp │ │ ├── ConfigurationFetchRequestTest.cpp │ │ ├── ConfigurationTest.cpp │ │ ├── ConnectionTest.cpp │ │ ├── ConnectionTest_fixtures.cpp │ │ ├── ConnectionTest_fixtures.h │ │ ├── CopySetSelectorTest.cpp │ │ ├── CopySetSelectorTestUtil.h │ │ ├── CostQueueTest.cpp │ │ ├── DRRTest.cpp │ │ ├── DataSizeRequestTest.cpp │ │ ├── DigestTest.cpp │ │ ├── DigestTestUtil.cpp │ │ ├── DigestTestUtil.h │ │ ├── DomainIsolationCheckerTest.cpp │ │ ├── EpochMetaDataCacheTest.cpp │ │ ├── EpochRecoveryTest.cpp │ │ ├── EpochSequencerTest.cpp │ │ ├── ErrorStringTest.cpp │ │ ├── EventLogRebuildingSetTest.cpp │ │ ├── EventLogTest.cpp │ │ ├── EventLoopTaskQueueTest.cpp │ │ ├── EventTrackerTest.cpp │ │ ├── ExponentialBackoffAdaptiveVariableTest.cpp │ │ ├── FailureDomainTest.cpp │ │ ├── FileConfigSourceTest.cpp │ │ ├── FindKeyRequestTest.cpp │ │ ├── FlowGroupTest.cpp │ │ ├── FlowGroupTest.h │ │ ├── FlowMeterTest.cpp │ │ ├── GET_CLUSTER_STATE_REPLY_MessageTest.cpp │ │ ├── GetClusterStateTest.cpp │ │ ├── GetEpochRecoveryMetadataRequestTest.cpp │ │ ├── GetHeadAttributesRequestTest.cpp │ │ ├── GetLogInfoRequestTest.cpp │ │ ├── GetRsmSnapshotRequestTest.cpp │ │ ├── GetSeqStateRequestTest.cpp │ │ ├── GetTrimPointRequestTest.cpp │ │ ├── GraylistingTrackerTest.cpp │ │ ├── HashingTest.cpp │ │ ├── InMemNodesConfigurationStore.h │ │ ├── InMemVersionedConfigStore.cpp │ │ ├── InMemVersionedConfigStore.h │ │ ├── InlineRequestPoster.h │ │ ├── KeyValueStoreStateMachineTest.cpp │ │ ├── LibeventTimerTest.cpp │ │ ├── LifoEventSemTest.cpp │ │ ├── LocalLogStoreRecordFormatTest.cpp │ │ ├── LogBasedRSMSnapshotStoreTest.cpp │ │ ├── LogLoadDistribution.h │ │ ├── LogsConfigCodecTest.cpp │ │ ├── LogsConfigTreeTest.cpp │ │ ├── MPSCQueueTest.cpp │ │ ├── MessageReaderTest.cpp │ │ ├── MessageSerializationTest.cpp │ │ ├── MessagingPostImportantTest.cpp │ │ ├── MessagingTest.cpp │ │ ├── MetaDataLogReaderTest.cpp │ │ ├── MetaDataLogTrimmerTest.cpp │ │ ├── MockBackoffTimer.h │ │ ├── MockConnectionFactory.h │ │ ├── MockLibeventTimer.h │ │ ├── MockNetworkDependencies.h │ │ ├── MockNodeServiceDiscovery.h │ │ ├── MockNodeSetAccessor.h │ │ ├── MockNodeSetFinder.h │ │ ├── MockNodesConfiguration.h │ │ ├── MockNodesConfigurationManager.cpp │ │ ├── MockNodesConfigurationManager.h │ │ ├── MockNodesConfigurationStore.h │ │ ├── MockProtocolHandler.h │ │ ├── MockSequencerRouter.h │ │ ├── MockSettings.h │ │ ├── MockShapingConfig.h │ │ ├── MockSocketAdapter.h │ │ ├── MockThriftApi.h │ │ ├── MockTimer.h │ │ ├── MockTraceLogger.h │ │ ├── MockVersionedConfigStore.h │ │ ├── MockZookeeperClient.h │ │ ├── MutatorTest.cpp │ │ ├── NODE_STATS_AGGREGATE_MessageTest.cpp │ │ ├── NODE_STATS_AGGREGATE_REPLY_MessageTest.cpp │ │ ├── NodeIndicesAllocatorTest.cpp │ │ ├── NodeLocationTest.cpp │ │ ├── NodeSetAccessorTest.cpp │ │ ├── NodeSetFinderTest.cpp │ │ ├── NodeSetStateTest.cpp │ │ ├── NodeSetStateTest.h │ │ ├── NodeSetTestUtil.cpp │ │ ├── NodeSetTestUtil.h │ │ ├── NodesConfigurationInitTest.cpp │ │ ├── NodesConfigurationManagerTest.cpp │ │ ├── NodesConfigurationPollerTest.cpp │ │ ├── NodesConfigurationStoreTest.cpp │ │ ├── NodesConfigurationTest.cpp │ │ ├── NodesConfigurationTestUtil.cpp │ │ ├── NodesConfigurationTestUtil.h │ │ ├── NodesConfigurationUtilsTest.cpp │ │ ├── ObjectPollerTest.cpp │ │ ├── OffsetMapTest.cpp │ │ ├── OutlierDetectionTest.cpp │ │ ├── OverloadDetectorTest.cpp │ │ ├── PayloadGroupCodecTest.cpp │ │ ├── PeriodicReleasesTest.cpp │ │ ├── PriorityQueueTest.cpp │ │ ├── ProcessorTest.cpp │ │ ├── ProtocolReaderTest.cpp │ │ ├── RECORD_MessageTest.cpp │ │ ├── RSMSnapshotHeaderTest.cpp │ │ ├── RandomNodeSelectorTest.cpp │ │ ├── RandomNodeSetSelectorTest.cpp │ │ ├── RateEstimatorTest.cpp │ │ ├── RateLimiterTest.cpp │ │ ├── ReadStreamDebugInfoSamplingConfigTest.cpp │ │ ├── ReaderTest.cpp │ │ ├── RequestUtilTest.cpp │ │ ├── RetryHandlerTest.cpp │ │ ├── SSLSessionCacheTest.cpp │ │ ├── SamplingTest.cpp │ │ ├── SenderTestProxy.h │ │ ├── SequencerMembershipTest.cpp │ │ ├── SequencerRouterTest.cpp │ │ ├── SequencerTest.cpp │ │ ├── ServerBasedNodesConfigurationStoreTest.cpp │ │ ├── SettingsTest.cpp │ │ ├── ShardStateTrackerTest.cpp │ │ ├── SlidingWindowTest.cpp │ │ ├── SocketConnectCallbackTest.cpp │ │ ├── StatsTest.cpp │ │ ├── StorageMembershipTest.cpp │ │ ├── StreamAppendRequestTest.cpp │ │ ├── StreamWriterTest.cpp │ │ ├── TailRecordTest.cpp │ │ ├── TestNodeSetSelector.h │ │ ├── TestUtil.cpp │ │ ├── TestUtil.h │ │ ├── ThriftMessageSerializerTest.cpp │ │ ├── ThriftSenderTest.cpp │ │ ├── TimerTest.cpp │ │ ├── ToStringTest.cpp │ │ ├── TraceSampleTest.cpp │ │ ├── TrimDataLogRequestTest.cpp │ │ ├── UnorderedMapWithLRUTest.cpp │ │ ├── UpdateableSharedPtrTest.cpp │ │ ├── UtilTest.cpp │ │ ├── WeakRefHolderTest.cpp │ │ ├── WeightedCopySetSelectorTest.cpp │ │ ├── WheelTimerTest.cpp │ │ ├── WorkContextTest.cpp │ │ ├── WorkerLoadBalancingTest.cpp │ │ ├── WorkerTimeoutStatsTest.cpp │ │ ├── ZookeeperClientInMemory.cpp │ │ ├── ZookeeperClientInMemory.h │ │ ├── ZookeeperClientInMemoryTest.cpp │ │ ├── benchmarks │ │ │ ├── BenchmarkMain.cpp │ │ │ ├── DebugLoggingBenchmark.cpp │ │ │ ├── LogsConfigTreeBenchmark.cpp │ │ │ ├── NodeSetSelectorBenchmark.cpp │ │ │ ├── SequencerBatchingBenchmark.cpp │ │ │ ├── SequencerMapBenchmark.cpp │ │ │ ├── StatsBenchmark.cpp │ │ │ ├── TimerBenchmark.cpp │ │ │ ├── UpdateableSharedPtrBenchmark.cpp │ │ │ └── WorkerBenchmark.cpp │ │ ├── configs │ │ │ ├── bad_id.conf │ │ │ ├── conf_internal_logs_permission_test.conf │ │ │ ├── conf_permission_acl_test.conf │ │ │ ├── conf_permission_test.conf │ │ │ ├── conf_permission_test_permission_checking_disabled.conf │ │ │ ├── conf_permission_test_req_auth.conf │ │ │ ├── config_permission_invalid_action.conf │ │ │ ├── custom_fields.conf │ │ │ ├── defaults.conf │ │ │ ├── dscp_default.conf │ │ │ ├── dup_metanodes.conf │ │ │ ├── dup_server_name.conf │ │ │ ├── duphost.conf │ │ │ ├── dupid.conf │ │ │ ├── dupname.conf │ │ │ ├── epochstore_test.conf │ │ │ ├── internal_logs_correct.conf │ │ │ ├── internal_logs_incorrect_backlog.conf │ │ │ ├── invalid_authenticator_type.conf │ │ │ ├── invalid_generation_with_non_storage_role.conf │ │ │ ├── invalid_permission_checker_type.conf │ │ │ ├── invalid_properties_sequencer1.conf │ │ │ ├── invalid_properties_sequencer2.conf │ │ │ ├── invalid_properties_sequencer3.conf │ │ │ ├── invalid_roles_empty.conf │ │ │ ├── invalid_roles_not_array.conf │ │ │ ├── invalid_roles_unknown.conf │ │ │ ├── invalid_sequencer_affinity.conf │ │ │ ├── invalid_use_of_permission1.conf │ │ │ ├── invalid_use_of_permission2.conf │ │ │ ├── kobold │ │ │ │ └── components │ │ │ │ │ └── logdevice.py │ │ │ ├── lcm_client_cannot_take_snapshot.conf │ │ │ ├── logsconfig_manager_with_logs.conf │ │ │ ├── logsconfig_manager_without_logs.conf │ │ │ ├── missing_auth_type_info.conf │ │ │ ├── namespaced_logs.conf │ │ │ ├── namespaced_logs_delimiter.conf │ │ │ ├── namespaced_logs_with_permissions.conf │ │ │ ├── negative_replication.conf │ │ │ ├── no_nodes_no_metadata.conf │ │ │ ├── nodeset_test.conf │ │ │ ├── noid.conf │ │ │ ├── overlap1.conf │ │ │ ├── overlap2.conf │ │ │ ├── overlap3.conf │ │ │ ├── partial_ssl_nodes.conf │ │ │ ├── replication_too_big.conf │ │ │ ├── sample_invalid1.conf │ │ │ ├── sample_no_ssl.conf │ │ │ ├── sample_valid.conf │ │ │ ├── security_and_permission_info.conf │ │ │ ├── sequencer_affinity_2nodes.conf │ │ │ ├── sequencer_affinity_7nodes.conf │ │ │ ├── sequencer_test.conf │ │ │ ├── sequencer_weights.conf │ │ │ ├── serialization_test.conf │ │ │ ├── ssl_double_fail.conf │ │ │ ├── storage_capacity_fail2.conf │ │ │ ├── storage_capacity_fail3.conf │ │ │ ├── storage_capacity_fail4.conf │ │ │ ├── storage_capacity_fail5.conf │ │ │ ├── storage_capacity_fail6.conf │ │ │ ├── storage_capacity_success1.conf │ │ │ ├── storage_capacity_success2.conf │ │ │ └── user_log_within_internal_range.conf │ │ └── ssl_certs │ │ │ ├── logdevice_test.key │ │ │ ├── logdevice_test_server_identity.cert │ │ │ ├── logdevice_test_valid.cert │ │ │ ├── logdevice_test_valid_ca.cert │ │ │ ├── logdevice_test_valid_ca.key │ │ │ └── ssl_ticket_seeds.json │ ├── test_request_types.inc │ ├── thrift │ │ ├── RocketChannelWrapper.cpp │ │ ├── RocketChannelWrapper.h │ │ ├── SimpleThriftClientFactory.h │ │ ├── ThriftClientFactory.h │ │ ├── ThriftRouter.cpp │ │ ├── ThriftRouter.h │ │ └── compat │ │ │ ├── ThriftMessageSerializer.cpp │ │ │ ├── ThriftMessageSerializer.h │ │ │ ├── ThriftSender.cpp │ │ │ ├── ThriftSender.h │ │ │ ├── ThriftSession.cpp │ │ │ └── ThriftSession.h │ ├── toString.h │ ├── traffic_classes.inc │ ├── types_internal.h │ ├── util.cpp │ ├── util.h │ ├── version.h │ ├── work_model │ │ ├── SerialWorkContext.h │ │ ├── WorkContext.cpp │ │ └── WorkContext.h │ └── worker_types.inc ├── debian │ ├── .gitignore │ ├── changelog │ ├── compat │ ├── control │ ├── copyright │ ├── rules │ ├── source │ │ └── format │ └── triggers ├── doc │ ├── buffered-writer.md │ ├── client-api.md │ ├── headers-dependencies.md │ ├── ldbench.md │ ├── partially-trimmed.md │ ├── rejecting-stores-based-on-copyset.md │ └── weighted-copyset-selector-locality.md ├── examples │ ├── CMakeLists.txt │ ├── buffered_writer.cpp │ ├── cat.cpp │ ├── logdevice.conf │ ├── parse_target_log.cpp │ ├── parse_target_log.h │ ├── tail.cpp │ ├── tail_async.cpp │ ├── tail_flags.h │ ├── trim.cpp │ └── write.cpp ├── external │ ├── flatbuffers │ │ └── CMakeLists.txt │ ├── gason │ │ └── CMakeLists.txt │ └── gtest │ │ └── CMakeLists.txt ├── flake8_plugins ├── footer.html ├── include │ ├── AsyncCheckpointedReader.h │ ├── AsyncReader.h │ ├── BufferedWriteDecoder.h │ ├── BufferedWriter.h │ ├── CheckpointStore.h │ ├── CheckpointStoreFactory.h │ ├── CheckpointedReaderBase.h │ ├── CheckpointedReaderFactory.h │ ├── Client.h │ ├── ClientFactory.h │ ├── ClientSettings.h │ ├── ClusterAttributes.h │ ├── ConfigSubscriptionHandle.h │ ├── EnumMap.h │ ├── Err.h │ ├── LogAttributes.h │ ├── LogHeadAttributes.h │ ├── LogTailAttributes.h │ ├── LogsConfigTypes.h │ ├── NodeLocationScope.h │ ├── PermissionActions.h │ ├── README │ ├── Reader.h │ ├── Record.h │ ├── RecordOffset.h │ ├── SyncCheckpointedReader.h │ ├── debug.h │ ├── errors.inc │ ├── node_location_scopes.inc │ ├── strong_typedef.h │ └── types.h ├── lib │ ├── AppendErrorInjector.cpp │ ├── AppendErrorInjector.h │ ├── AsyncReader.cpp │ ├── AsyncReaderImpl.cpp │ ├── AsyncReaderImpl.h │ ├── BufferedWriteDecoder.cpp │ ├── BufferedWriter.cpp │ ├── CMakeLists.txt │ ├── ClientFactory.cpp │ ├── ClientImpl.cpp │ ├── ClientImpl.h │ ├── ClientMessageDispatch.cpp │ ├── ClientMessageDispatch.h │ ├── ClientPluginHelper.cpp │ ├── ClientPluginHelper.h │ ├── ClientProcessor.cpp │ ├── ClientProcessor.h │ ├── ClientSettings.cpp │ ├── ClientSettingsImpl.cpp │ ├── ClientSettingsImpl.h │ ├── ClientWorker.cpp │ ├── ClientWorker.h │ ├── ClusterAttributesImpl.h │ ├── LogsConfigTypesImpl.h │ ├── NODE_STATS_REPLY_onReceived.cpp │ ├── NODE_STATS_REPLY_onReceived.h │ ├── NODE_STATS_onSent.cpp │ ├── NODE_STATS_onSent.h │ ├── NodeStatsHandler.cpp │ ├── NodeStatsHandler.h │ ├── NodeStatsMessageCallback.h │ ├── Reader.cpp │ ├── RemoteLogsConfig.cpp │ ├── RemoteLogsConfig.h │ ├── checkpointing │ │ ├── AsyncCheckpointedReaderImpl.cpp │ │ ├── AsyncCheckpointedReaderImpl.h │ │ ├── CheckpointStoreFactory.cpp │ │ ├── CheckpointStoreImpl.cpp │ │ ├── CheckpointStoreImpl.h │ │ ├── CheckpointedReaderBase.cpp │ │ ├── CheckpointedReaderFactory.cpp │ │ ├── SyncCheckpointedReaderImpl.cpp │ │ ├── SyncCheckpointedReaderImpl.h │ │ ├── if │ │ │ ├── CMakeLists.txt │ │ │ └── Checkpoint.thrift │ │ └── test │ │ │ ├── CheckpointStoreImplTest.cpp │ │ │ ├── CheckpointedReaderBaseTest.cpp │ │ │ ├── CheckpointedReaderTest.cpp │ │ │ ├── CheckpointingIntegrationTest.cpp │ │ │ ├── MockCheckpointStore.h │ │ │ └── MockCheckpointedReader.h │ ├── ops │ │ ├── EventLogUtils.cpp │ │ ├── EventLogUtils.h │ │ ├── LocateSequencerRequest.cpp │ │ ├── LocateSequencerRequest.h │ │ ├── SequencerContactor.cpp │ │ └── SequencerContactor.h │ ├── shadow │ │ ├── Shadow.cpp │ │ ├── Shadow.h │ │ ├── ShadowClient.cpp │ │ └── ShadowClient.h │ ├── test │ │ ├── AppendErrorInjectorTest.cpp │ │ ├── ClientSettingsTest.cpp │ │ ├── ClientTest.cpp │ │ ├── MockAsyncReader.h │ │ ├── MockClient.h │ │ ├── MockReader.h │ │ ├── NodeStatsHandlerTest.cpp │ │ ├── RecordTest.cpp │ │ ├── ShadowTest.cpp │ │ └── findtimebenchmark │ │ │ └── FindTimeBenchmark.cpp │ └── verifier │ │ ├── DataSourceReader.h │ │ ├── DataSourceWriter.h │ │ ├── GenVerifyData.cpp │ │ ├── GenVerifyData.h │ │ ├── LogDeviceDataSourceReader.cpp │ │ ├── LogDeviceDataSourceReader.h │ │ ├── LogDeviceDataSourceWriter.cpp │ │ ├── LogDeviceDataSourceWriter.h │ │ ├── MockDataSourceReader.cpp │ │ ├── MockDataSourceReader.h │ │ ├── MockDataSourceWriter.cpp │ │ ├── MockDataSourceWriter.h │ │ ├── ReadVerifyData.cpp │ │ ├── ReadVerifyData.h │ │ ├── VerificationDataStructures.cpp │ │ ├── VerificationDataStructures.h │ │ ├── VerificationReader.cpp │ │ ├── VerificationReader.h │ │ ├── VerificationWriter.cpp │ │ ├── VerificationWriter.h │ │ └── test │ │ └── VerificationTest.cpp ├── ops │ ├── .gitignore │ ├── CMakeLists.txt │ ├── README.md │ ├── admin_server │ │ ├── CMakeLists.txt │ │ ├── StandaloneAdminServer.cpp │ │ ├── StandaloneAdminServer.h │ │ └── main.cpp │ ├── ldops │ │ ├── __init__.py │ │ ├── admin_api.py │ │ ├── cluster.py │ │ ├── const.py │ │ ├── exceptions.py │ │ ├── maintenance.py │ │ ├── testutil │ │ │ ├── __init__.py │ │ │ ├── async_test.py │ │ │ └── mock_admin_api.py │ │ ├── types │ │ │ ├── __init__.py │ │ │ ├── cluster.py │ │ │ ├── cluster_view.py │ │ │ ├── maintenance_view.py │ │ │ ├── node.py │ │ │ ├── node_view.py │ │ │ ├── sequencer_maintenance_progress.py │ │ │ ├── shard_maintenance_progress.py │ │ │ ├── socket_address.py │ │ │ └── tests │ │ │ │ ├── test_cluster.py │ │ │ │ ├── test_cluster_view.py │ │ │ │ ├── test_maintenance_view.py │ │ │ │ ├── test_node_view.py │ │ │ │ ├── test_sequencer_maintenance_progress.py │ │ │ │ ├── test_shard_maintenance_progress.py │ │ │ │ └── test_socket_address.py │ │ └── util │ │ │ ├── __init__.py │ │ │ ├── convert.py │ │ │ ├── helpers.py │ │ │ └── tests │ │ │ ├── test_convert.py │ │ │ └── test_helpers.py │ ├── ldquery │ │ ├── CMakeLists.txt │ │ ├── Context.h │ │ ├── Errors.h │ │ ├── LDQuery.cpp │ │ ├── LDQuery.h │ │ ├── Table.cpp │ │ ├── Table.h │ │ ├── TableRegistry.cpp │ │ ├── TableRegistry.h │ │ ├── Utils.cpp │ │ ├── Utils.h │ │ ├── VirtualTable.cpp │ │ ├── VirtualTable.h │ │ ├── markdown-ldquery.cpp │ │ ├── py │ │ │ ├── CMakeLists.txt │ │ │ ├── LDQueryModule.cpp │ │ │ ├── __init__.py │ │ │ ├── examples.sql │ │ │ └── lib.py │ │ └── tables │ │ │ ├── AdminCommandTable.cpp │ │ │ ├── AdminCommandTable.h │ │ │ ├── AppendOutliers.h │ │ │ ├── AppendThroughput.h │ │ │ ├── CatchupQueues.h │ │ │ ├── ChunkRebuildings.h │ │ │ ├── ClientReadStreams.h │ │ │ ├── ClusterStateTable.cpp │ │ │ ├── ClusterStateTable.h │ │ │ ├── EpochStore.cpp │ │ │ ├── EpochStore.h │ │ │ ├── EventLog.h │ │ │ ├── Graylist.h │ │ │ ├── HistoricalMetadata.cpp │ │ │ ├── HistoricalMetadata.h │ │ │ ├── Info.h │ │ │ ├── InfoConfig.h │ │ │ ├── InfoRsm.h │ │ │ ├── Iterators.h │ │ │ ├── LogGroups.cpp │ │ │ ├── LogGroups.h │ │ │ ├── LogRebuildings.h │ │ │ ├── LogStorageState.h │ │ │ ├── LogsConfigRsm.h │ │ │ ├── LogsDBDirectory.h │ │ │ ├── LogsDBMetadata.h │ │ │ ├── Nodes.cpp │ │ │ ├── Nodes.h │ │ │ ├── Partitions.h │ │ │ ├── Purges.h │ │ │ ├── Readers.h │ │ │ ├── Record.h │ │ │ ├── RecordCache.h │ │ │ ├── Recoveries.h │ │ │ ├── Sequencers.h │ │ │ ├── Settings.h │ │ │ ├── ShardAuthoritativeStatus.cpp │ │ │ ├── ShardAuthoritativeStatus.h │ │ │ ├── ShardRebuildings.h │ │ │ ├── Shards.h │ │ │ ├── Sockets.h │ │ │ ├── Stats.h │ │ │ ├── StatsRocksdb.h │ │ │ ├── StorageTasks.h │ │ │ ├── StoredLogs.h │ │ │ └── SyncSequencerRequests.h │ ├── ldshell │ │ ├── __init__.py │ │ ├── autoload │ │ │ ├── __init__.py │ │ │ ├── commands │ │ │ │ ├── __init__.py │ │ │ │ ├── config.py │ │ │ │ ├── connect.py │ │ │ │ ├── logsconfig.py │ │ │ │ ├── maintenance.py │ │ │ │ ├── nodes_config.py │ │ │ │ ├── query.py │ │ │ │ ├── safety.py │ │ │ │ └── status.py │ │ │ └── statusbar.py │ │ ├── helpers.py │ │ ├── logdevice_context.py │ │ ├── logdevice_plugin.py │ │ ├── main.py │ │ └── main_py.py │ ├── py_extensions │ │ ├── CMakeLists.txt │ │ ├── admin_command_client │ │ │ ├── AdminCommandClient.cpp │ │ │ ├── AdminCommandClient.h │ │ │ ├── CMakeLists.txt │ │ │ └── py │ │ │ │ ├── AdminCommandClientModule.cpp │ │ │ │ ├── CMakeLists.txt │ │ │ │ └── admin_command_client.pyi │ │ └── nodes_configuration │ │ │ ├── CMakeLists.txt │ │ │ ├── nodes_configuration_manager.cpp │ │ │ └── nodes_configuration_manager.pyi │ ├── setup.py │ └── utils │ │ ├── LogsConfigUtils.cpp │ │ ├── LogsConfigUtils.h │ │ ├── MaintenanceManagerMigration.cpp │ │ ├── MaintenanceManagerUtils.cpp │ │ └── MaintenanceManagerUtils.h ├── replication_checker │ ├── CMakeLists.txt │ ├── LogErrorTracker.cpp │ ├── LogErrorTracker.h │ ├── ReplicationCheckerSettings.cpp │ ├── ReplicationCheckerSettings.h │ └── main.cpp ├── server │ ├── CMakeLists.txt │ ├── CleanedResponseRequest.cpp │ ├── CleanedResponseRequest.h │ ├── ConnectionListener.cpp │ ├── ConnectionListener.h │ ├── EpochRecordCache.cpp │ ├── EpochRecordCache.h │ ├── EpochRecordCacheEntry.cpp │ ├── EpochRecordCacheEntry.h │ ├── FailureDetector.cpp │ ├── FailureDetector.h │ ├── FindKeyStorageTask.cpp │ ├── FindKeyStorageTask.h │ ├── FixedKeysMap.h │ ├── GAP_onSent.cpp │ ├── GAP_onSent.h │ ├── GOSSIP_onSent.cpp │ ├── GOSSIP_onSent.h │ ├── GetEpochRecoveryMetadataStorageTask.cpp │ ├── GetEpochRecoveryMetadataStorageTask.h │ ├── GossipRequest.h │ ├── HealthMonitor.cpp │ ├── HealthMonitor.h │ ├── IOFaultInjection.cpp │ ├── IOFaultInjection.h │ ├── LazySequencerPlacement.h │ ├── Listener.cpp │ ├── Listener.h │ ├── LocalRSMSnapshotStoreImpl.cpp │ ├── LocalRSMSnapshotStoreImpl.h │ ├── LocalSnapshotStoreWithFallbacks.cpp │ ├── LocalSnapshotStoreWithFallbacks.h │ ├── LogGroupCustomCounters.cpp │ ├── LogGroupCustomCounters.h │ ├── LogGroupThroughput.cpp │ ├── LogGroupThroughput.h │ ├── LogStoreMonitor.cpp │ ├── LogStoreMonitor.h │ ├── MyNodeIDFinder.cpp │ ├── MyNodeIDFinder.h │ ├── NewConnectionRequest.cpp │ ├── NewConnectionRequest.h │ ├── NodeRegistrationHandler.cpp │ ├── NodeRegistrationHandler.h │ ├── RECORD_onSent.cpp │ ├── RECORD_onSent.h │ ├── RealTimeRecordBuffer.cpp │ ├── RealTimeRecordBuffer.h │ ├── RecordCache.cpp │ ├── RecordCache.h │ ├── RecordCacheDependencies.h │ ├── RecordCacheDisposal.cpp │ ├── RecordCacheDisposal.h │ ├── RecordCacheMonitorThread.cpp │ ├── RecordCacheMonitorThread.h │ ├── RecordCachePersistence.cpp │ ├── RecordCachePersistence.h │ ├── ReleaseRequest.cpp │ ├── ReleaseRequest.h │ ├── RepopulateRecordCachesRequest.cpp │ ├── RepopulateRecordCachesRequest.h │ ├── RotatingFile.cpp │ ├── RotatingFile.h │ ├── RsmServerSnapshotStoreFactory.h │ ├── STARTED_onSent.cpp │ ├── STARTED_onSent.h │ ├── STORE_onSent.cpp │ ├── STORE_onSent.h │ ├── Server.cpp │ ├── Server.h │ ├── ServerMessageDispatch.cpp │ ├── ServerMessageDispatch.h │ ├── ServerProcessor.cpp │ ├── ServerProcessor.h │ ├── ServerRecordEqualityFilter.h │ ├── ServerRecordFilterFactory.h │ ├── ServerRecordRangeFilter.h │ ├── ServerSSLFetcher.cpp │ ├── ServerSSLFetcher.h │ ├── ServerSettings.cpp │ ├── ServerSettings.h │ ├── ServerTLSCredMonitor.cpp │ ├── ServerTLSCredMonitor.h │ ├── ServerWorker.cpp │ ├── ServerWorker.h │ ├── StoreStateMachine.cpp │ ├── StoreStateMachine.h │ ├── StoreStorageTask.cpp │ ├── StoreStorageTask.h │ ├── UnreleasedRecordDetector.cpp │ ├── UnreleasedRecordDetector.h │ ├── WatchDogThread.cpp │ ├── WatchDogThread.h │ ├── admincommands │ │ ├── AdminCommand.h │ │ ├── AdminCommandFactory.cpp │ │ ├── AdminCommandFactory.h │ │ ├── BlockCatchupQueue.h │ │ ├── BoycottReset.h │ │ ├── CloseSocket.h │ │ ├── CommandProcessor.cpp │ │ ├── CommandProcessor.h │ │ ├── CommandSelector.cpp │ │ ├── CommandSelector.h │ │ ├── Compact.h │ │ ├── CreateCheckpoint.h │ │ ├── CustomCounters.cpp │ │ ├── CustomCounters.h │ │ ├── DeprecatedStats.h │ │ ├── DumpQueuedMessages.h │ │ ├── Failsafe.h │ │ ├── Fill.h │ │ ├── GossipBlacklist.h │ │ ├── Info.h │ │ ├── InfoAppendOutliers.h │ │ ├── InfoBoycotts.h │ │ ├── InfoCatchupQueues.h │ │ ├── InfoClientReadStreams.h │ │ ├── InfoConfig.h │ │ ├── InfoEventLog.h │ │ ├── InfoGossip.h │ │ ├── InfoGraylist.h │ │ ├── InfoIterators.h │ │ ├── InfoLogsConfigRsm.h │ │ ├── InfoLogsDBMetadata.h │ │ ├── InfoPartitions.h │ │ ├── InfoPurges.h │ │ ├── InfoReaders.h │ │ ├── InfoRebuildings.h │ │ ├── InfoRecord.h │ │ ├── InfoRecordCache.h │ │ ├── InfoRecoveries.h │ │ ├── InfoReplication.h │ │ ├── InfoRsm.h │ │ ├── InfoSST.h │ │ ├── InfoSequencers.h │ │ ├── InfoSettings.h │ │ ├── InfoShardOperationalState.h │ │ ├── InfoShards.h │ │ ├── InfoSockets.h │ │ ├── InfoStorageTasks.h │ │ ├── InfoStoredLogs.h │ │ ├── InfoSyncSequencerRequests.h │ │ ├── InfoWriteMetaDataRecord.h │ │ ├── InjectShardFault.h │ │ ├── ListOrEraseMetadata.h │ │ ├── LogStorageStateCommand.h │ │ ├── NewConnections.h │ │ ├── Partitions.h │ │ ├── PauseOrUnpauseFileEpochStore.h │ │ ├── PrintLogsDBDirectories.h │ │ ├── RSMTrim.h │ │ ├── RSMWriteSnapshot.h │ │ ├── Rebuilding.h │ │ ├── Record.h │ │ ├── SequencerDeactivationRequest.cpp │ │ ├── SequencerDeactivationRequest.h │ │ ├── Setting.cpp │ │ ├── Setting.h │ │ ├── StartRecovery.h │ │ ├── Stats.h │ │ ├── StatsHistogram.h │ │ ├── StatsJemalloc.h │ │ ├── StatsRocks.h │ │ ├── StatsThroughput.cpp │ │ ├── StatsThroughput.h │ │ ├── Stop.h │ │ ├── StoreTimeouts.h │ │ ├── TrafficShaping.h │ │ └── UpDown.h │ ├── digest │ │ └── if │ │ │ └── digest.thrift │ ├── epoch_store │ │ ├── EpochMetaDataZRQ.h │ │ ├── EpochStoreEpochMetaDataFormat.cpp │ │ ├── EpochStoreEpochMetaDataFormat.h │ │ ├── EpochStoreLastCleanEpochFormat.cpp │ │ ├── EpochStoreLastCleanEpochFormat.h │ │ ├── FileEpochStore.cpp │ │ ├── FileEpochStore.h │ │ ├── GetLastCleanEpochZRQ.h │ │ ├── LastCleanEpochZRQ.h │ │ ├── LogMetaData.cpp │ │ ├── LogMetaData.h │ │ ├── LogMetaDataCodec.cpp │ │ ├── LogMetaDataCodec.h │ │ ├── SetLastCleanEpochZRQ.h │ │ ├── ZookeeperEpochStore.cpp │ │ ├── ZookeeperEpochStore.h │ │ ├── ZookeeperEpochStoreRequest.cpp │ │ ├── ZookeeperEpochStoreRequest.h │ │ └── if │ │ │ ├── CMakeLists.txt │ │ │ └── EpochStore.thrift │ ├── fatalsignal.cpp │ ├── fatalsignal.h │ ├── flaky_tests.cmake │ ├── locallogstore │ │ ├── CMakeLists.txt │ │ ├── ClusterMarkerChecker.cpp │ │ ├── ClusterMarkerChecker.h │ │ ├── CompactionRequest.cpp │ │ ├── CompactionRequest.h │ │ ├── FailingLocalLogStore.cpp │ │ ├── FailingLocalLogStore.h │ │ ├── IOTracing.cpp │ │ ├── IOTracing.h │ │ ├── IteratorSearch.cpp │ │ ├── IteratorSearch.h │ │ ├── IteratorTracker.cpp │ │ ├── IteratorTracker.h │ │ ├── LocalLogStore.cpp │ │ ├── LocalLogStore.h │ │ ├── LocalLogStoreFactory.h │ │ ├── LocalLogStoreSettings.cpp │ │ ├── LocalLogStoreSettings.h │ │ ├── LogStorageState_PurgeCoordinator_Bridge.h │ │ ├── MemtableFlushedRequest.cpp │ │ ├── MemtableFlushedRequest.h │ │ ├── NodeDirtyData.h │ │ ├── PartitionMetadata.cpp │ │ ├── PartitionMetadata.h │ │ ├── PartitionedRocksDBStore.cpp │ │ ├── PartitionedRocksDBStore.h │ │ ├── PartitionedRocksDBStoreFindKey.cpp │ │ ├── PartitionedRocksDBStoreFindKey.h │ │ ├── PartitionedRocksDBStoreFindTime.cpp │ │ ├── PartitionedRocksDBStoreFindTime.h │ │ ├── PartitionedRocksDBStoreIterators.cpp │ │ ├── PartitionedRocksDBStoreIterators.h │ │ ├── RocksDBCache.cpp │ │ ├── RocksDBCache.h │ │ ├── RocksDBColumnFamily.h │ │ ├── RocksDBCompactionFilter.cpp │ │ ├── RocksDBCompactionFilter.h │ │ ├── RocksDBCustomiser.cpp │ │ ├── RocksDBCustomiser.h │ │ ├── RocksDBEnv.cpp │ │ ├── RocksDBEnv.h │ │ ├── RocksDBFlushBlockPolicy.h │ │ ├── RocksDBKeyFormat.h │ │ ├── RocksDBListener.cpp │ │ ├── RocksDBListener.h │ │ ├── RocksDBLocalLogStore.cpp │ │ ├── RocksDBLocalLogStore.h │ │ ├── RocksDBLogStoreBase.cpp │ │ ├── RocksDBLogStoreBase.h │ │ ├── RocksDBLogStoreConfig.cpp │ │ ├── RocksDBLogStoreConfig.h │ │ ├── RocksDBLogStoreFactory.cpp │ │ ├── RocksDBLogStoreFactory.h │ │ ├── RocksDBLogger.cpp │ │ ├── RocksDBLogger.h │ │ ├── RocksDBMemTableRep.cpp │ │ ├── RocksDBMemTableRep.h │ │ ├── RocksDBMemTableRepWrapper.h │ │ ├── RocksDBMetricsExport.h │ │ ├── RocksDBSettings.cpp │ │ ├── RocksDBSettings.h │ │ ├── RocksDBWriter.cpp │ │ ├── RocksDBWriter.h │ │ ├── RocksDBWriterMergeOperator.cpp │ │ ├── RocksDBWriterMergeOperator.h │ │ ├── ShardedRocksDBLocalLogStore.cpp │ │ ├── ShardedRocksDBLocalLogStore.h │ │ ├── WriteOps.h │ │ └── test │ │ │ ├── BufferedWALFileTest.cpp │ │ │ ├── LocalLogStoreTestReader.cpp │ │ │ ├── LocalLogStoreTestReader.h │ │ │ ├── MemtableFlushedRequestTest.cpp │ │ │ ├── PartitionedRocksDBStoreTest.cpp │ │ │ ├── RocksDBLocalLogStoreTest.cpp │ │ │ ├── RocksDBWriterMergeOperatorTest.cpp │ │ │ ├── StoreUtil.cpp │ │ │ ├── StoreUtil.h │ │ │ ├── TemporaryLogStore.cpp │ │ │ └── TemporaryLogStore.h │ ├── main.cpp │ ├── message_handlers │ │ ├── CHECK_NODE_HEALTH_onReceived.cpp │ │ ├── CHECK_NODE_HEALTH_onReceived.h │ │ ├── CHECK_SEAL_onReceived.cpp │ │ ├── CHECK_SEAL_onReceived.h │ │ ├── DATA_SIZE_onReceived.cpp │ │ ├── DATA_SIZE_onReceived.h │ │ ├── DELETE_LOG_METADATA_onReceived.cpp │ │ ├── DELETE_LOG_METADATA_onReceived.h │ │ ├── DELETE_onReceived.cpp │ │ ├── DELETE_onReceived.h │ │ ├── FINDKEY_onReceived.cpp │ │ ├── FINDKEY_onReceived.h │ │ ├── GET_EPOCH_RECOVERY_METADATA_REPLY_onReceived.cpp │ │ ├── GET_EPOCH_RECOVERY_METADATA_REPLY_onReceived.h │ │ ├── GET_EPOCH_RECOVERY_METADATA_onReceived.cpp │ │ ├── GET_EPOCH_RECOVERY_METADATA_onReceived.h │ │ ├── GET_HEAD_ATTRIBUTES_onReceived.cpp │ │ ├── GET_HEAD_ATTRIBUTES_onReceived.h │ │ ├── GET_RSM_SNAPSHOT_onReceived.cpp │ │ ├── GET_RSM_SNAPSHOT_onReceived.h │ │ ├── GET_TRIM_POINT_onReceived.cpp │ │ ├── GET_TRIM_POINT_onReceived.h │ │ ├── GOSSIP_onReceived.cpp │ │ ├── GOSSIP_onReceived.h │ │ ├── LOGS_CONFIG_API_onReceived.cpp │ │ ├── LOGS_CONFIG_API_onReceived.h │ │ ├── MEMTABLE_FLUSHED_onReceived.cpp │ │ ├── MEMTABLE_FLUSHED_onReceived.h │ │ ├── SEAL_onReceived.cpp │ │ ├── SEAL_onReceived.h │ │ ├── START_onReceived.cpp │ │ ├── START_onReceived.h │ │ ├── STOP_onReceived.cpp │ │ ├── STOP_onReceived.h │ │ ├── STORED_onReceived.cpp │ │ ├── STORED_onReceived.h │ │ ├── TRIM_onReceived.cpp │ │ └── TRIM_onReceived.h │ ├── read_path │ │ ├── AllServerReadStreams.cpp │ │ ├── AllServerReadStreams.h │ │ ├── CatchupOneStream.cpp │ │ ├── CatchupOneStream.h │ │ ├── CatchupQueue.cpp │ │ ├── CatchupQueue.h │ │ ├── IteratorCache.cpp │ │ ├── IteratorCache.h │ │ ├── LocalLogStoreReader.cpp │ │ ├── LocalLogStoreReader.h │ │ ├── LogStorageState.cpp │ │ ├── LogStorageState.h │ │ ├── LogStorageStateMap.cpp │ │ ├── LogStorageStateMap.h │ │ ├── ReadIoShapingCallback.cpp │ │ ├── ReadIoShapingCallback.h │ │ ├── ServerReadStream.cpp │ │ └── ServerReadStream.h │ ├── rebuilding │ │ ├── ChunkRebuilding.cpp │ │ ├── ChunkRebuilding.h │ │ ├── NonAuthoritativeRebuildingChecker.cpp │ │ ├── NonAuthoritativeRebuildingChecker.h │ │ ├── RebuildingCoordinator.cpp │ │ ├── RebuildingCoordinator.h │ │ ├── RebuildingEnumerateMetadataLogsTask.cpp │ │ ├── RebuildingEnumerateMetadataLogsTask.h │ │ ├── RebuildingLogEnumerator.cpp │ │ ├── RebuildingLogEnumerator.h │ │ ├── RebuildingMarkerChecker.cpp │ │ ├── RebuildingMarkerChecker.h │ │ ├── RebuildingPlan.cpp │ │ ├── RebuildingPlan.h │ │ ├── RebuildingPlanner.cpp │ │ ├── RebuildingPlanner.h │ │ ├── RebuildingReadStorageTask.cpp │ │ ├── RebuildingReadStorageTask.h │ │ ├── RebuildingSupervisor.cpp │ │ ├── RebuildingSupervisor.h │ │ ├── RecordRebuildingAmend.cpp │ │ ├── RecordRebuildingAmend.h │ │ ├── RecordRebuildingBase.cpp │ │ ├── RecordRebuildingBase.h │ │ ├── RecordRebuildingStore.cpp │ │ ├── RecordRebuildingStore.h │ │ ├── ShardRebuilding.cpp │ │ ├── ShardRebuilding.h │ │ ├── WaitForPurgesRequest.cpp │ │ └── WaitForPurgesRequest.h │ ├── sequencer_boycotting │ │ ├── AppendOutlierDetector.h │ │ ├── BoycottTracker.cpp │ │ ├── BoycottTracker.h │ │ ├── BoycottingStats.cpp │ │ ├── BoycottingStats.h │ │ ├── MovingAverageAppendOutlierDetector.cpp │ │ ├── MovingAverageAppendOutlierDetector.h │ │ ├── NODE_STATS_AGGREGATE_REPLY_onReceived.cpp │ │ ├── NODE_STATS_AGGREGATE_REPLY_onReceived.h │ │ ├── NODE_STATS_AGGREGATE_onReceived.cpp │ │ ├── NODE_STATS_AGGREGATE_onReceived.h │ │ ├── NODE_STATS_onReceived.cpp │ │ ├── NODE_STATS_onReceived.h │ │ ├── NodeStatsController.cpp │ │ ├── NodeStatsController.h │ │ ├── NodeStatsControllerCallback.h │ │ ├── NodeStatsControllerLocator.cpp │ │ ├── NodeStatsControllerLocator.h │ │ ├── PerClientNodeStatsAggregator.cpp │ │ └── PerClientNodeStatsAggregator.h │ ├── shutdown.cpp │ ├── shutdown.h │ ├── storage │ │ ├── AllCachedDigests.cpp │ │ ├── AllCachedDigests.h │ │ ├── CachedDigest.cpp │ │ ├── CachedDigest.h │ │ ├── DeleteLogMetadataStorageTask.h │ │ ├── DeleteStorageTask.h │ │ ├── DumpReleaseStateStorageTask.cpp │ │ ├── DumpReleaseStateStorageTask.h │ │ ├── LocalLogStoreUtils.cpp │ │ ├── LocalLogStoreUtils.h │ │ ├── PurgeCoordinator.cpp │ │ ├── PurgeCoordinator.h │ │ ├── PurgeScheduler.cpp │ │ ├── PurgeScheduler.h │ │ ├── PurgeSingleEpoch.cpp │ │ ├── PurgeSingleEpoch.h │ │ ├── PurgeUncleanEpochs.cpp │ │ ├── PurgeUncleanEpochs.h │ │ ├── SealStorageTask.cpp │ │ └── SealStorageTask.h │ ├── storage_tasks │ │ ├── EpochOffsetStorageTask.cpp │ │ ├── EpochOffsetStorageTask.h │ │ ├── ExecStorageThread.cpp │ │ ├── ExecStorageThread.h │ │ ├── PerWorkerStorageTaskQueue.cpp │ │ ├── PerWorkerStorageTaskQueue.h │ │ ├── PrioritizedQueue.h │ │ ├── ReadStorageTask.cpp │ │ ├── ReadStorageTask.h │ │ ├── RecordCacheRepopulationTask.cpp │ │ ├── RecordCacheRepopulationTask.h │ │ ├── RecoverSealTask.cpp │ │ ├── RecoverSealTask.h │ │ ├── ShardedStorageThreadPool.cpp │ │ ├── ShardedStorageThreadPool.h │ │ ├── StorageTask.cpp │ │ ├── StorageTask.h │ │ ├── StorageTaskResponse.cpp │ │ ├── StorageTaskResponse.h │ │ ├── StorageThread.h │ │ ├── StorageThreadPool.cpp │ │ ├── StorageThreadPool.h │ │ ├── SyncingStorageThread.cpp │ │ ├── SyncingStorageThread.h │ │ ├── WriteBatchStorageTask.cpp │ │ ├── WriteBatchStorageTask.h │ │ ├── WriteStorageTask.cpp │ │ └── WriteStorageTask.h │ ├── test │ │ ├── AllServerReadStreamsTest.cpp │ │ ├── BoycottTrackerTest.cpp │ │ ├── BoycottingStatsTest.cpp │ │ ├── CachedDigestTest.cpp │ │ ├── CatchupQueueTest.cpp │ │ ├── ConnectionListenerTest.cpp │ │ ├── EpochMetaDataTest.cpp │ │ ├── FailureDetectorTest.cpp │ │ ├── FileEpochStoreTest.cpp │ │ ├── FindKeyStorageTaskTest.cpp │ │ ├── GOSSIP_MessageTest.cpp │ │ ├── GetEpochRecoveryMetadataStorageTaskTest.cpp │ │ ├── HealthMonitorTest.cpp │ │ ├── IOFaultInjectionTest.cpp │ │ ├── LastCleanEpochStoreFormatTest.cpp │ │ ├── LocalLogStoreReaderTest.cpp │ │ ├── LocalRSMSnapshotStoreTest.cpp │ │ ├── LogMetaDataCodecTest.cpp │ │ ├── LogStorageStateMapTest.cpp │ │ ├── MockHealthMonitor.h │ │ ├── MovingAverageAppendOutlierDetectorTest.cpp │ │ ├── NODE_STATS_MessageTest.cpp │ │ ├── NodeRegistrationHandlerTest.cpp │ │ ├── NodeStatsControllerLocatorTest.cpp │ │ ├── NodeStatsControllerTest.cpp │ │ ├── PurgeSingleEpochTest.cpp │ │ ├── PurgeUncleanEpochsTest.cpp │ │ ├── RebuildingCoordinatorTest.cpp │ │ ├── RebuildingMarkerCheckerTest.cpp │ │ ├── RebuildingReadStorageTaskTest.cpp │ │ ├── RecordCacheTest.cpp │ │ ├── RecordRebuildingAmendTest.cpp │ │ ├── RecordRebuildingTest.cpp │ │ ├── RequestUtilTest.cpp │ │ ├── RotatingFileTest.cpp │ │ ├── SealStorageTaskTest.cpp │ │ ├── ServerSettingsTest.cpp │ │ ├── ShardRebuildingTest.cpp │ │ ├── StorageThreadPoolTest.cpp │ │ ├── StorageThreadPoolTestQueueDrop.cpp │ │ ├── StoreStorageTaskTest.cpp │ │ ├── SyncingStorageThreadTest.cpp │ │ ├── TLSCredReloadTest.cpp │ │ ├── TestUtil.cpp │ │ ├── TestUtil.h │ │ ├── UnreleasedRecordDetectorTest.cpp │ │ ├── WriteStorageTaskTest.cpp │ │ ├── ZookeeperEpochStoreTest.cpp │ │ ├── benchmarks │ │ │ ├── LogStorageStateMapBenchmark.cpp │ │ │ └── SocketBenchmark.cpp │ │ └── configs │ │ │ ├── local_scd_test.conf │ │ │ └── unreleased_record_detector_test.conf │ ├── thrift │ │ ├── LogDeviceThreadManager.cpp │ │ ├── LogDeviceThreadManager.h │ │ ├── LogDeviceThriftHandler.cpp │ │ ├── LogDeviceThriftHandler.h │ │ ├── LogDeviceThriftServer.cpp │ │ ├── LogDeviceThriftServer.h │ │ ├── SimpleThriftServer.cpp │ │ ├── SimpleThriftServer.h │ │ └── api │ │ │ ├── CompatThriftHandler.cpp │ │ │ ├── CompatThriftHandler.h │ │ │ ├── LogDeviceAPIThriftHandler.h │ │ │ └── ThriftApiHandlerBase.h │ ├── util.cpp │ └── util.h ├── test │ ├── AppendErrorInjectorIntegrationTest.cpp │ ├── AppendIntegrationTest.cpp │ ├── AppendProbeIntegrationTest.cpp │ ├── BufferedWriterIntegrationTest.cpp │ ├── BufferedWriterTestUtils.h │ ├── ByteOffsetTest.cpp │ ├── CMakeLists.txt │ ├── ClientReadStreamFailureDetectorIntegrationTest.cpp │ ├── CompatibilityTest.cpp │ ├── ConfigIntegrationTest.cpp │ ├── ConfigPermissionTest.cpp │ ├── ConnectionIntegrationTest.cpp │ ├── DataSizeTest.cpp │ ├── DocumentationInSyncTest.cpp │ ├── FailureDetectorIntegrationTest.cpp │ ├── FailureDomainIntegrationTest.cpp │ ├── FindTimeIntegrationTest.cpp │ ├── GetHeadAttributesIntegrationTest.cpp │ ├── GraylistingTrackerIntegrationTest.cpp │ ├── InternalLogsIntegrationTest.cpp │ ├── IsLogEmptyTest.cpp │ ├── LocalLogStoreIntegrationTest.cpp │ ├── LogsConfigApiIntegrationTest.cpp │ ├── MessagingSocketTest.cpp │ ├── MetaDataLogsIntegrationTest.cpp │ ├── MyNodeIDChangedIntegrationTest.cpp │ ├── NCMIntegrationTest.cpp │ ├── NodeConfigChangeTest.cpp │ ├── NodeSetTest.cpp │ ├── NodeStatsControllerIntegrationTest.cpp │ ├── NodesConfigurationInitIntegrationTest.cpp │ ├── NonAuthoritativeRebuildingTest.cpp │ ├── ProtocolChecksumIntegrationTest.cpp │ ├── RSMBasedVersionedConfigStoreIntegrationTest.cpp │ ├── RSMSnapshotStoreIntegrationTest.cpp │ ├── ReadingIntegrationTest.cpp │ ├── RebuildingSupervisorIntegrationTest.cpp │ ├── RebuildingTest.cpp │ ├── RecordCacheIntegrationTest.cpp │ ├── RecoveryTest.cpp │ ├── SafetyAPIIntegrationTest.cpp │ ├── SelfRegistrationIntegrationTest.cpp │ ├── SequencerBatchingTest.cpp │ ├── SequencerIntegrationTest.cpp │ ├── ServerMessageDispatchTest.cpp │ ├── ShadowIntegrationTest.cpp │ ├── ShutdownIntegrationTest.cpp │ ├── StreamWriterIntegrationTest.cpp │ ├── StrongTypedefTest.cpp │ ├── TailRecordIntegrationTest.cpp │ ├── ThriftApiIntegrationTest.cpp │ ├── ThriftApiIntegrationTestBase.h │ ├── TrimIntegrationTest.cpp │ ├── admin │ │ ├── AdminAPICheckImpactTest.cpp │ │ ├── AdminAPILowLevelTest.cpp │ │ ├── AdminAPINodeConfigTest.cpp │ │ ├── AdminAPINodeStateTest.cpp │ │ ├── MaintenanceAPITest.cpp │ │ └── MaintenanceManagerTest.cpp │ ├── flaky_tests.cmake │ ├── ldbench │ │ ├── end2end_test │ │ │ ├── Command.py │ │ │ ├── ConfigChecker.py │ │ │ ├── Environment.py │ │ │ ├── Execution.py │ │ │ ├── MpmcBenchmark.py │ │ │ ├── Results.py │ │ │ ├── Workers.py │ │ │ ├── mpmc_example_config.json │ │ │ └── readme.md │ │ ├── test │ │ │ └── worker_util_test.cpp │ │ └── worker │ │ │ ├── BackfillWorker.cpp │ │ │ ├── BenchStats.cpp │ │ │ ├── BenchStats.h │ │ │ ├── BenchStatsHolderTest.cpp │ │ │ ├── BenchStatsTest.cpp │ │ │ ├── BenchTracer.h │ │ │ ├── ClientHolderIntegrationTest.cpp │ │ │ ├── EventStore.h │ │ │ ├── FileBasedEventStore.h │ │ │ ├── FileBasedEventStoreTest.cpp │ │ │ ├── FileBasedStatsStore.h │ │ │ ├── FileBasedStatsStoreTest.cpp │ │ │ ├── FindTimeWorker.cpp │ │ │ ├── Histogram.h │ │ │ ├── IsLogEmptyWorker.cpp │ │ │ ├── KafkaClient.cpp │ │ │ ├── KafkaClient.h │ │ │ ├── KafkaClientHolderTest.cpp │ │ │ ├── KafkaClientTest.cpp │ │ │ ├── KafkaReader.cpp │ │ │ ├── KafkaReader.h │ │ │ ├── Kafka_conf.json │ │ │ ├── LogDeviceClient.cpp │ │ │ ├── LogDeviceClient.h │ │ │ ├── LogDeviceClientTest.cpp │ │ │ ├── LogDeviceReader.cpp │ │ │ ├── LogDeviceReader.h │ │ │ ├── LogDeviceReaderTest.cpp │ │ │ ├── LogStoreClient.cpp │ │ │ ├── LogStoreClient.h │ │ │ ├── LogStoreClientHolder.cpp │ │ │ ├── LogStoreClientHolder.h │ │ │ ├── LogStoreReader.cpp │ │ │ ├── LogStoreReader.h │ │ │ ├── LogStoreTypes.h │ │ │ ├── MetaRequestWorker.cpp │ │ │ ├── MetaRequestWorker.h │ │ │ ├── Options.cpp │ │ │ ├── Options.h │ │ │ ├── OptionsModule.cpp │ │ │ ├── ReadWorker.cpp │ │ │ ├── ReadYourWriteLatencyWorker.cpp │ │ │ ├── RecordWriterInfo.cpp │ │ │ ├── RecordWriterInfo.h │ │ │ ├── Reservoir.h │ │ │ ├── StatsStore.h │ │ │ ├── SteadyWriteRateWorker.cpp │ │ │ ├── SteadyWriteRateWorker.h │ │ │ ├── Worker.cpp │ │ │ ├── Worker.h │ │ │ ├── WorkerRegistry.cpp │ │ │ ├── WorkerRegistry.h │ │ │ ├── WriteSaturationWorker.cpp │ │ │ ├── WriteWorker.cpp │ │ │ ├── main.cpp │ │ │ ├── util.cpp │ │ │ └── util.h │ ├── phony_main.cpp │ ├── select-hosts.sh │ └── utils │ │ ├── AdminAPITestUtils.cpp │ │ ├── AdminAPITestUtils.h │ │ ├── AdminServer.cpp │ │ ├── AdminServer.h │ │ ├── AppendThread.h │ │ ├── IntegrationTestBase.h │ │ ├── IntegrationTestUtils.cpp │ │ ├── IntegrationTestUtils.h │ │ ├── MetaDataProvisioner.cpp │ │ ├── MetaDataProvisioner.h │ │ ├── NodesConfigurationFileUpdater.cpp │ │ ├── NodesConfigurationFileUpdater.h │ │ ├── ParamMaps.h │ │ ├── ReaderThread.h │ │ ├── SelfRegisteredCluster.cpp │ │ ├── SelfRegisteredCluster.h │ │ ├── ServerInfo.h │ │ ├── localhost-cluster.cpp │ │ ├── port_selection.cpp │ │ ├── port_selection.h │ │ ├── sizes.cpp │ │ ├── util.cpp │ │ └── util.h └── tools │ ├── ldadmin │ ├── LDAdmin.cpp │ ├── LDAdmin.h │ ├── TransportOptionPlugins.h │ └── main.cpp │ └── stress.py └── website ├── blog └── 2018-09-12-open-sourcing-announcement.md ├── core └── Footer.js ├── package.json ├── pages └── en │ ├── help.js │ ├── index.js │ ├── users.js │ └── versions.js ├── sidebars.json ├── siteConfig.js ├── static ├── .circleci │ └── config.yml ├── .nojekyll ├── css │ └── custom.css └── img │ ├── facebook.png │ ├── facebook_logdevice_whitewordmark.png │ ├── favicon.png │ ├── favicon │ └── favicon.ico │ ├── logdevice.png │ ├── logdevice.svg │ ├── logdevice_og.png │ ├── oss_logo.png │ └── top_bg_dc.png ├── versioned_docs ├── version-2.46.5 │ ├── API_Introduction.md │ ├── FailureDetection.md │ ├── LogsDB.md │ ├── ReadPath.md │ ├── Rebuilding.md │ ├── Recovery.md │ ├── Replication.md │ ├── TrafficShaping.md │ ├── Write_path.md │ ├── concepts.md │ ├── configuration.md │ ├── consistency.md │ ├── doxygen.md │ ├── firstcluster.md │ ├── installation.md │ ├── ldquery.md │ ├── ldshell.md │ ├── localcluster.md │ ├── log_configuration.md │ ├── overview.md │ ├── settings.md │ └── writing_plugins.md └── version-latest │ ├── ReadPath.md │ ├── TrafficShaping.md │ ├── Write_path.md │ ├── administration │ ├── admin_server.md │ ├── ldquery.md │ ├── ldshell.md │ ├── maintenances.md │ └── safety_checker.md │ ├── configuration.md │ ├── firstcluster.md │ ├── installation.md │ ├── kubernetes.md │ ├── localcluster.md │ ├── overview.md │ └── settings.md ├── versioned_sidebars ├── version-2.46.5-sidebars.json └── version-latest-sidebars.json └── versions.json /.dockerignore: -------------------------------------------------------------------------------- 1 | .git/ 2 | docker/ 3 | logdevice/build/ 4 | logdevice/external/folly/.git/ 5 | logdevice/external/rocksdb/.git/ 6 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | _build/ 2 | *~ 3 | .DS_Store 4 | website/translated_docs 5 | website/build/ 6 | website/yarn.lock 7 | website/node_modules 8 | website/package-lock.json 9 | website/i18n 10 | website/i18n/* 11 | !website/i18n/en.json 12 | website/yarn-error.log 13 | logdevice_*.deb 14 | logdevice_*.build 15 | logdevice_*.buildinfo 16 | logdevice_*.changes 17 | logdevice-dbgsym_*.ddeb 18 | -------------------------------------------------------------------------------- /.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "logdevice/external/rocksdb"] 2 | path = logdevice/external/rocksdb 3 | url = https://github.com/facebook/rocksdb/ 4 | branch = 6.6.fb 5 | [submodule "logdevice/external/folly"] 6 | path = logdevice/external/folly 7 | url = https://github.com/facebook/folly/ 8 | [submodule "logdevice/external/fizz"] 9 | path = logdevice/external/fizz 10 | url = https://github.com/facebookincubator/fizz/ 11 | [submodule "logdevice/external/wangle"] 12 | path = logdevice/external/wangle 13 | url = https://github.com/facebook/wangle/ 14 | [submodule "logdevice/external/fbthrift"] 15 | path = logdevice/external/fbthrift 16 | url = https://github.com/facebook/fbthrift/ 17 | -------------------------------------------------------------------------------- /CNAME: -------------------------------------------------------------------------------- 1 | logdevice.io -------------------------------------------------------------------------------- /build/fbcode_builder/.gitignore: -------------------------------------------------------------------------------- 1 | # Facebook-internal CI builds don't have write permission outside of the 2 | # source tree, so we install all projects into this directory. 3 | /facebook_ci 4 | __pycache__/ 5 | *.pyc 6 | -------------------------------------------------------------------------------- /build/fbcode_builder/CMake/FBBuildOptions.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | function (fb_activate_static_library_option) 4 | option(USE_STATIC_DEPS_ON_UNIX 5 | "If enabled, use static dependencies on unix systems. This is generally discouraged." 6 | OFF 7 | ) 8 | # Mark USE_STATIC_DEPS_ON_UNIX as an "advanced" option, since enabling it 9 | # is generally discouraged. 10 | mark_as_advanced(USE_STATIC_DEPS_ON_UNIX) 11 | 12 | if(UNIX AND USE_STATIC_DEPS_ON_UNIX) 13 | SET(CMAKE_FIND_LIBRARY_SUFFIXES ".a" PARENT_SCOPE) 14 | endif() 15 | endfunction() 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/CMake/FBCompilerSettings.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | # This file applies common compiler settings that are shared across 4 | # a number of Facebook opensource projects. 5 | # Please use caution and your best judgement before making changes 6 | # to these shared compiler settings in order to avoid accidentally 7 | # breaking a build in another project! 8 | 9 | if (WIN32) 10 | include(FBCompilerSettingsMSVC) 11 | else() 12 | include(FBCompilerSettingsUnix) 13 | endif() 14 | -------------------------------------------------------------------------------- /build/fbcode_builder/CMake/FBCompilerSettingsMSVC.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | # This file applies common compiler settings that are shared across 4 | # a number of Facebook opensource projects. 5 | # Please use caution and your best judgement before making changes 6 | # to these shared compiler settings in order to avoid accidentally 7 | # breaking a build in another project! 8 | 9 | add_compile_options( 10 | /wd4250 # 'class1' : inherits 'class2::member' via dominance 11 | ) 12 | -------------------------------------------------------------------------------- /build/fbcode_builder/CMake/FBCompilerSettingsUnix.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | 3 | # This file applies common compiler settings that are shared across 4 | # a number of Facebook opensource projects. 5 | # Please use caution and your best judgement before making changes 6 | # to these shared compiler settings in order to avoid accidentally 7 | # breaking a build in another project! 8 | 9 | set(CMAKE_CXX_FLAGS_COMMON "-g -Wall -Wextra -Wno-deprecated -Wno-deprecated-declarations") 10 | set(CMAKE_CXX_FLAGS_DEBUG "${CMAKE_CXX_FLAGS_DEBUG} ${CMAKE_CXX_FLAGS_COMMON}") 11 | set(CMAKE_CXX_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} ${CMAKE_CXX_FLAGS_COMMON} -O3") 12 | -------------------------------------------------------------------------------- /build/fbcode_builder/CMake/FindPCRE.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | include(FindPackageHandleStandardArgs) 3 | find_path(PCRE_INCLUDE_DIR NAMES pcre.h) 4 | find_library(PCRE_LIBRARY NAMES pcre) 5 | find_package_handle_standard_args( 6 | PCRE 7 | DEFAULT_MSG 8 | PCRE_LIBRARY 9 | PCRE_INCLUDE_DIR 10 | ) 11 | mark_as_advanced(PCRE_INCLUDE_DIR PCRE_LIBRARY) 12 | -------------------------------------------------------------------------------- /build/fbcode_builder/CMake/FindRe2.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This software may be used and distributed according to the terms of the 4 | # GNU General Public License version 2. 5 | 6 | find_library(RE2_LIBRARY re2) 7 | mark_as_advanced(RE2_LIBRARY) 8 | 9 | find_path(RE2_INCLUDE_DIR NAMES re2/re2.h) 10 | mark_as_advanced(RE2_INCLUDE_DIR) 11 | 12 | include(FindPackageHandleStandardArgs) 13 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( 14 | RE2 15 | REQUIRED_VARS RE2_LIBRARY RE2_INCLUDE_DIR) 16 | 17 | if(RE2_FOUND) 18 | set(RE2_LIBRARY ${RE2_LIBRARY}) 19 | set(RE2_INCLUDE_DIR, ${RE2_INCLUDE_DIR}) 20 | endif() 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/docker_enable_ipv6.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | 4 | 5 | # `daemon.json` is normally missing, but let's log it in case that changes. 6 | touch /etc/docker/daemon.json 7 | service docker stop 8 | echo '{"ipv6": true, "fixed-cidr-v6": "2001:db8:1::/64"}' > /etc/docker/daemon.json 9 | service docker start 10 | # Fail early if docker failed on start -- add `- sudo dockerd` to debug. 11 | docker info 12 | # Paranoia log: what if our config got overwritten? 13 | cat /etc/docker/daemon.json 14 | -------------------------------------------------------------------------------- /build/fbcode_builder/facebook_fbcode_builder_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 'Demo config, so that `facebook_make_legocastle_job.py --help` works here.' 8 | 9 | config = read_fbcode_builder_config('fbcode_builder_config.py') 10 | config['legocastle_opts'] = { 11 | 'alias': 'example-oss', 12 | 'oncall': 'example', 13 | 'build_name': 'Open-source build for http://example.com', 14 | } 15 | -------------------------------------------------------------------------------- /build/fbcode_builder/fbcode_builder_config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 'Demo config, so that `make_docker_context.py --help` works in this directory.' 8 | 9 | config = { 10 | 'fbcode_builder_spec': lambda _builder: { 11 | 'depends_on': [], 12 | 'steps': [], 13 | }, 14 | 'github_project': 'demo/project', 15 | } 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/getdeps/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/build/fbcode_builder/getdeps/__init__.py -------------------------------------------------------------------------------- /build/fbcode_builder/getdeps/errors.py: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # 3 | # This source code is licensed under the MIT license found in the 4 | # LICENSE file in the root directory of this source tree. 5 | 6 | from __future__ import absolute_import, division, print_function, unicode_literals 7 | 8 | 9 | class TransientFailure(Exception): 10 | """Raising this error causes getdeps to return with an error code 11 | that Sandcastle will consider to be a retryable transient 12 | infrastructure error""" 13 | 14 | pass 15 | 16 | 17 | class ManifestNotFound(Exception): 18 | def __init__(self, manifest_name): 19 | super(Exception, self).__init__("Unable to find manifest '%s'" % manifest_name) 20 | -------------------------------------------------------------------------------- /build/fbcode_builder/getdeps/test/fixtures/duplicate/foo: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = foo 3 | -------------------------------------------------------------------------------- /build/fbcode_builder/getdeps/test/fixtures/duplicate/subdir/foo: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = foo 3 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/OpenNSA: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = OpenNSA 3 | 4 | [download] 5 | url = https://docs.broadcom.com/docs-and-downloads/csg/opennsa-6.5.19.tgz 6 | sha256 = 80c3a26f688dd7fc08880fdbbad9ac3424b435697b0ccb889487f55f2bc425c4 7 | 8 | [build] 9 | builder = nop 10 | subdir = opennsa-6.5.19 11 | 12 | [install.files] 13 | lib/x86-64 = lib 14 | include = include 15 | src/gpl-modules/systems/bde/linux/include = include/systems/bde/linux 16 | src/gpl-modules/include/ibde.h = include/ibde.h 17 | src/gpl-modules = src/gpl-modules 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/autoconf: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = autoconf 3 | 4 | [rpms] 5 | autoconf 6 | 7 | [debs] 8 | autoconf 9 | 10 | [download] 11 | url = http://ftp.gnu.org/gnu/autoconf/autoconf-2.69.tar.gz 12 | sha256 = 954bd69b391edc12d6a4a51a2dd1476543da5c6bbf05a95b59dc0dd6fd4c2969 13 | 14 | [build] 15 | builder = autoconf 16 | subdir = autoconf-2.69 17 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/automake: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = automake 3 | 4 | [rpms] 5 | automake 6 | 7 | [debs] 8 | automake 9 | 10 | [download] 11 | url = http://ftp.gnu.org/gnu/automake/automake-1.16.1.tar.gz 12 | sha256 = 608a97523f97db32f1f5d5615c98ca69326ced2054c9f82e65bade7fc4c9dea8 13 | 14 | [build] 15 | builder = autoconf 16 | subdir = automake-1.16.1 17 | 18 | [dependencies] 19 | autoconf 20 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/bison: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = bison 3 | 4 | [rpms] 5 | bison 6 | 7 | [debs] 8 | bison 9 | 10 | [download.not(os=windows)] 11 | url = https://mirrors.kernel.org/gnu/bison/bison-3.3.tar.gz 12 | sha256 = fdeafb7fffade05604a61e66b8c040af4b2b5cbb1021dcfe498ed657ac970efd 13 | 14 | [download.os=windows] 15 | url = https://github.com/lexxmark/winflexbison/releases/download/v2.5.17/winflexbison-2.5.17.zip 16 | sha256 = 3dc27a16c21b717bcc5de8590b564d4392a0b8577170c058729d067d95ded825 17 | 18 | [build.not(os=windows)] 19 | builder = autoconf 20 | subdir = bison-3.3 21 | 22 | [build.os=windows] 23 | builder = nop 24 | 25 | [install.files.os=windows] 26 | data = bin/data 27 | win_bison.exe = bin/bison.exe 28 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/cpptoml: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = cpptoml 3 | 4 | [download] 5 | url = https://github.com/skystrife/cpptoml/archive/v0.1.1.tar.gz 6 | sha256 = 23af72468cfd4040984d46a0dd2a609538579c78ddc429d6b8fd7a10a6e24403 7 | 8 | [build] 9 | builder = cmake 10 | subdir = cpptoml-0.1.1 11 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/double-conversion: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = double-conversion 3 | 4 | [download] 5 | url = https://github.com/google/double-conversion/archive/v3.1.4.tar.gz 6 | sha256 = 95004b65e43fefc6100f337a25da27bb99b9ef8d4071a36a33b5e83eb1f82021 7 | 8 | [build] 9 | builder = cmake 10 | subdir = double-conversion-3.1.4 11 | 12 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fatal: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fatal 3 | fbsource_path = fbcode/fatal 4 | shipit_project = fatal 5 | 6 | [git] 7 | repo_url = https://github.com/facebook/fatal.git 8 | 9 | [shipit.pathmap] 10 | fbcode/fatal = . 11 | fbcode/fatal/public_tld = . 12 | 13 | [build] 14 | builder = nop 15 | subdir = . 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fb303: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fb303 3 | fbsource_path = fbcode/fb303 4 | shipit_project = fb303 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebookincubator/fb303.git 9 | 10 | [build] 11 | builder = cmake 12 | 13 | [dependencies] 14 | folly 15 | gflags 16 | glog 17 | fbthrift 18 | 19 | [cmake.defines.test=on] 20 | BUILD_TESTS=ON 21 | 22 | [cmake.defines.test=off] 23 | BUILD_TESTS=OFF 24 | 25 | [shipit.pathmap] 26 | fbcode/fb303/github = . 27 | fbcode/fb303 = fb303 28 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fb303-source: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fb303-source 3 | fbsource_path = fbcode/fb303 4 | shipit_project = fb303 5 | shipit_fbcode_builder = false 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/fb303.git 9 | 10 | [build] 11 | builder = nop 12 | 13 | [shipit.pathmap] 14 | fbcode/fb303/github = . 15 | fbcode/fb303 = fb303 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fboss: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fboss 3 | fbsource_path = fbcode/fboss 4 | shipit_project = fboss 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/fboss.git 9 | 10 | [build.os=linux] 11 | builder = cmake 12 | 13 | [build.not(os=linux)] 14 | builder = nop 15 | 16 | [dependencies] 17 | folly 18 | fb303 19 | wangle 20 | fizz 21 | fmt 22 | libsodium 23 | googletest 24 | zstd 25 | fbthrift 26 | iproute2 27 | libmnl 28 | libusb 29 | libcurl 30 | libnl 31 | libsai 32 | OpenNSA 33 | re2 34 | python 35 | 36 | [shipit.pathmap] 37 | fbcode/fboss/github = . 38 | fbcode/fboss/common = common 39 | fbcode/fboss = fboss 40 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fbthrift: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fbthrift 3 | fbsource_path = fbcode/thrift 4 | shipit_project = fbthrift 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/fbthrift.git 9 | 10 | [build] 11 | builder = cmake 12 | 13 | [dependencies] 14 | bison 15 | flex 16 | folly 17 | wangle 18 | fizz 19 | fmt 20 | googletest 21 | libsodium 22 | python-six 23 | zstd 24 | 25 | [shipit.pathmap] 26 | fbcode/thrift/public_tld = . 27 | fbcode/thrift = thrift 28 | 29 | [shipit.strip] 30 | ^fbcode/thrift/thrift-config\.h$ 31 | ^fbcode/thrift/perf/canary.py$ 32 | ^fbcode/thrift/perf/loadtest.py$ 33 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fbthrift-source: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fbthrift-source 3 | fbsource_path = fbcode/thrift 4 | shipit_project = fbthrift 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/fbthrift.git 9 | 10 | [build] 11 | builder = nop 12 | 13 | [shipit.pathmap] 14 | fbcode/thrift/public_tld = . 15 | fbcode/thrift = thrift 16 | 17 | [shipit.strip] 18 | ^fbcode/thrift/thrift-config\.h$ 19 | ^fbcode/thrift/perf/canary.py$ 20 | ^fbcode/thrift/perf/loadtest.py$ 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fbzmq: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fbzmq 3 | fbsource_path = facebook/fbzmq 4 | shipit_project = fbzmq 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/fbzmq.git 9 | 10 | [build.os=linux] 11 | builder = cmake 12 | 13 | [build.not(os=linux)] 14 | # boost.fiber is required and that is not available on macos. 15 | # libzmq doesn't currently build on windows. 16 | builder = nop 17 | 18 | [dependencies] 19 | boost 20 | folly 21 | fbthrift 22 | googletest 23 | libzmq 24 | 25 | [shipit.pathmap] 26 | fbcode/fbzmq = fbzmq 27 | fbcode/fbzmq/public_tld = . 28 | 29 | [shipit.strip] 30 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fizz: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fizz 3 | fbsource_path = fbcode/fizz 4 | shipit_project = fizz 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebookincubator/fizz.git 9 | 10 | [build] 11 | builder = cmake 12 | subdir = fizz 13 | 14 | [cmake.defines] 15 | BUILD_EXAMPLES = OFF 16 | 17 | [cmake.defines.test=on] 18 | BUILD_TESTS = ON 19 | 20 | [cmake.defines.all(os=windows, test=on)] 21 | BUILD_TESTS = OFF 22 | 23 | [cmake.defines.test=off] 24 | BUILD_TESTS = OFF 25 | 26 | [dependencies] 27 | folly 28 | libsodium 29 | 30 | [dependencies.all(test=on, not(os=windows))] 31 | googletest_1_8 32 | 33 | [shipit.pathmap] 34 | fbcode/fizz/public_tld = . 35 | fbcode/fizz = fizz 36 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/fmt: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = fmt 3 | 4 | [download] 5 | url = https://github.com/fmtlib/fmt/archive/6.1.1.tar.gz 6 | sha256 = bf4e50955943c1773cc57821d6c00f7e2b9e10eb435fafdd66739d36056d504e 7 | 8 | [build] 9 | builder = cmake 10 | subdir = fmt-6.1.1 11 | 12 | [cmake.defines] 13 | FMT_TEST = OFF 14 | FMT_DOC = OFF 15 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/gflags: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = gflags 3 | 4 | [download] 5 | url = https://github.com/gflags/gflags/archive/v2.2.2.tar.gz 6 | sha256 = 34af2f15cf7367513b352bdcd2493ab14ce43692d2dcd9dfc499492966c64dcf 7 | 8 | [build] 9 | builder = cmake 10 | subdir = gflags-2.2.2 11 | 12 | [cmake.defines] 13 | BUILD_SHARED_LIBS = ON 14 | BUILD_STATIC_LIBS = ON 15 | #BUILD_gflags_nothreads_LIB = OFF 16 | BUILD_gflags_LIB = ON 17 | 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/git-lfs: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = git-lfs 3 | 4 | [download.os=linux] 5 | url = https://github.com/git-lfs/git-lfs/releases/download/v2.9.1/git-lfs-linux-amd64-v2.9.1.tar.gz 6 | sha256 = 2a8e60cf51ec45aa0f4332aa0521d60ec75c76e485d13ebaeea915b9d70ea466 7 | 8 | [build] 9 | builder = nop 10 | 11 | [install.files] 12 | git-lfs = bin/git-lfs 13 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/glog: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = glog 3 | 4 | [download] 5 | url = https://github.com/google/glog/archive/v0.4.0.tar.gz 6 | sha256 = f28359aeba12f30d73d9e4711ef356dc842886968112162bc73002645139c39c 7 | 8 | [build] 9 | builder = cmake 10 | subdir = glog-0.4.0 11 | 12 | [dependencies] 13 | gflags 14 | 15 | [cmake.defines] 16 | BUILD_SHARED_LIBS=ON 17 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/gnu-bash: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = gnu-bash 3 | 4 | [download.os=darwin] 5 | url = https://ftp.gnu.org/gnu/bash/bash-5.1-rc1.tar.gz 6 | sha256 = 0b2684eb1990329d499c96decfe2459f3e150deb915b0a9d03cf1be692b1d6d3 7 | 8 | [build.os=darwin] 9 | # The buildin FreeBSD bash on OSX is both outdated and incompatible with the 10 | # modern GNU bash, so for the sake of being cross-platform friendly this 11 | # manifest provides GNU bash. 12 | # NOTE: This is the 5.1-rc1 version, which is almost the same as what Homebrew 13 | # uses (Homebrew installs 5.0 with the 18 patches that in fact make the 5.1-rc1 14 | # version). 15 | builder = autoconf 16 | subdir = bash-5.1-rc1 17 | build_in_src_dir = true 18 | 19 | [build.not(os=darwin)] 20 | builder = nop 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/gnu-coreutils: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = gnu-coreutils 3 | 4 | [download.os=darwin] 5 | url = https://ftp.gnu.org/gnu/coreutils/coreutils-8.32.tar.gz 6 | sha256 = d5ab07435a74058ab69a2007e838be4f6a90b5635d812c2e26671e3972fca1b8 7 | 8 | [build.os=darwin] 9 | # The buildin FreeBSD version incompatible with the GNU one, so for the sake of 10 | # being cross-platform friendly this manifest provides the GNU version. 11 | builder = autoconf 12 | subdir = coreutils-8.32 13 | 14 | [build.not(os=darwin)] 15 | builder = nop 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/gnu-grep: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = gnu-grep 3 | 4 | [download.os=darwin] 5 | url = https://ftp.gnu.org/gnu/grep/grep-3.5.tar.gz 6 | sha256 = 9897220992a8fd38a80b70731462defa95f7ff2709b235fb54864ddd011141dd 7 | 8 | [build.os=darwin] 9 | # The buildin FreeBSD version incompatible with the GNU one, so for the sake of 10 | # being cross-platform friendly this manifest provides the GNU version. 11 | builder = autoconf 12 | subdir = grep-3.5 13 | 14 | [build.not(os=darwin)] 15 | builder = nop 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/gnu-sed: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = gnu-sed 3 | 4 | [download.os=darwin] 5 | url = https://ftp.gnu.org/gnu/sed/sed-4.8.tar.gz 6 | sha256 = 53cf3e14c71f3a149f29d13a0da64120b3c1d3334fba39c4af3e520be053982a 7 | 8 | [build.os=darwin] 9 | # The buildin FreeBSD version incompatible with the GNU one, so for the sake of 10 | # being cross-platform friendly this manifest provides the GNU version. 11 | builder = autoconf 12 | subdir = sed-4.8 13 | 14 | [build.not(os=darwin)] 15 | builder = nop 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/googletest: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = googletest 3 | 4 | [download] 5 | url = https://github.com/google/googletest/archive/release-1.10.0.tar.gz 6 | sha256 = 9dc9157a9a1551ec7a7e43daea9a694a0bb5fb8bec81235d8a1e6ef64c716dcb 7 | 8 | [build] 9 | builder = cmake 10 | subdir = googletest-release-1.10.0 11 | 12 | [cmake.defines] 13 | # Everything else defaults to the shared runtime, so tell gtest that 14 | # it should not use its choice of the static runtime 15 | gtest_force_shared_crt=ON 16 | 17 | [cmake.defines.os=windows] 18 | BUILD_SHARED_LIBS=ON 19 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/googletest_1_8: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = googletest_1_8 3 | 4 | [download] 5 | url = https://github.com/google/googletest/archive/release-1.8.0.tar.gz 6 | sha256 = 58a6f4277ca2bc8565222b3bbd58a177609e9c488e8a72649359ba51450db7d8 7 | 8 | [build] 9 | builder = cmake 10 | subdir = googletest-release-1.8.0 11 | 12 | [cmake.defines] 13 | # Everything else defaults to the shared runtime, so tell gtest that 14 | # it should not use its choice of the static runtime 15 | gtest_force_shared_crt=ON 16 | 17 | [cmake.defines.os=windows] 18 | BUILD_SHARED_LIBS=ON 19 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/gperf: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = gperf 3 | 4 | [download] 5 | url = http://ftp.gnu.org/pub/gnu/gperf/gperf-3.1.tar.gz 6 | sha256 = 588546b945bba4b70b6a3a616e80b4ab466e3f33024a352fc2198112cdbb3ae2 7 | 8 | [build.not(os=windows)] 9 | builder = autoconf 10 | subdir = gperf-3.1 11 | 12 | [build.os=windows] 13 | builder = nop 14 | 15 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/iproute2: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = iproute2 3 | 4 | [download] 5 | url = https://mirrors.edge.kernel.org/pub/linux/utils/net/iproute2/iproute2-4.12.0.tar.gz 6 | sha256 = 46612a1e2d01bb31932557bccdb1b8618cae9a439dfffc08ef35ed8e197f14ce 7 | 8 | [build.os=linux] 9 | builder = iproute2 10 | subdir = iproute2-4.12.0 11 | 12 | [build.not(os=linux)] 13 | builder = nop 14 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/jq: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = jq 3 | 4 | [rpms] 5 | jq 6 | 7 | [debs] 8 | jq 9 | 10 | [download.not(os=windows)] 11 | url = https://github.com/stedolan/jq/releases/download/jq-1.5/jq-1.5.tar.gz 12 | sha256 = c4d2bfec6436341113419debf479d833692cc5cdab7eb0326b5a4d4fbe9f493c 13 | 14 | [build.not(os=windows)] 15 | builder = autoconf 16 | subdir = jq-1.5 17 | 18 | [build.os=windows] 19 | builder = nop 20 | 21 | [autoconf.args] 22 | # This argument turns off some developers tool and it is recommended in jq's 23 | # README 24 | --disable-maintainer-mode 25 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/katran: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = katran 3 | fbsource_path = fbcode/katran 4 | shipit_project = katran 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebookincubator/katran.git 9 | 10 | [build.not(os=linux)] 11 | builder = nop 12 | 13 | [build.os=linux] 14 | builder = cmake 15 | subdir = . 16 | 17 | [cmake.defines.test=on] 18 | BUILD_TESTS=ON 19 | 20 | [cmake.defines.test=off] 21 | BUILD_TESTS=OFF 22 | 23 | 24 | [dependencies] 25 | folly 26 | fizz 27 | libbpf_0_2_0_beta 28 | libmnl 29 | zlib 30 | googletest 31 | 32 | 33 | [shipit.pathmap] 34 | fbcode/katran/public_root = . 35 | fbcode/katran = katran 36 | 37 | [shipit.strip] 38 | ^fbcode/katran/facebook 39 | ^fbcode/katran/OSS_SYNC 40 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libbpf: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libbpf 3 | 4 | [download] 5 | url = https://github.com/libbpf/libbpf/archive/v0.1.1.tar.gz 6 | sha256 = 3fd271cf65b39bf38432b29d9dd2f694600c97dab0928baee419a65b5db4e598 7 | 8 | # BPF only builds on linux, so make it a NOP on other platforms 9 | [build.not(os=linux)] 10 | builder = nop 11 | 12 | [build.os=linux] 13 | builder = make 14 | subdir = libbpf-0.1.1/src 15 | 16 | [make.build_args] 17 | BUILD_STATIC_ONLY=y 18 | 19 | # libbpf-0.1.1 requires uapi headers >= 5.8 20 | [make.install_args] 21 | install 22 | install_uapi_headers 23 | BUILD_STATIC_ONLY=y 24 | 25 | [dependencies] 26 | libelf 27 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libbpf_0_2_0_beta: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libbpf_0_2_0_beta 3 | 4 | [download] 5 | url = https://github.com/libbpf/libbpf/archive/b6dd2f2.tar.gz 6 | sha256 = 8db9dca90f5c445ef2362e3c6a00f3d6c4bf36e8782f8e27704109c78e541497 7 | 8 | # BPF only builds on linux, so make it a NOP on other platforms 9 | [build.not(os=linux)] 10 | builder = nop 11 | 12 | [build.os=linux] 13 | builder = make 14 | subdir = libbpf-b6dd2f2b7df4d3bd35d64aaf521d9ad18d766f53/src 15 | 16 | [make.build_args] 17 | BUILD_STATIC_ONLY=y 18 | 19 | # libbpf now requires uapi headers >= 5.8 20 | [make.install_args] 21 | install 22 | install_uapi_headers 23 | BUILD_STATIC_ONLY=y 24 | 25 | [dependencies] 26 | libelf 27 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libelf: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libelf 3 | 4 | [rpms] 5 | elfutils-libelf-devel-static 6 | 7 | [debs] 8 | libelf-dev 9 | 10 | [download] 11 | url = https://ftp.osuosl.org/pub/blfs/conglomeration/libelf/libelf-0.8.13.tar.gz 12 | sha256 = 591a9b4ec81c1f2042a97aa60564e0cb79d041c52faa7416acb38bc95bd2c76d 13 | 14 | # libelf only makes sense on linux, so make it a NOP on other platforms 15 | [build.not(os=linux)] 16 | builder = nop 17 | 18 | [build.os=linux] 19 | builder = autoconf 20 | subdir = libelf-0.8.13 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libevent: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libevent 3 | 4 | [rpms] 5 | libevent-devel 6 | 7 | [debs] 8 | libevent-dev 9 | 10 | # Note that the CMakeLists.txt file is present only in 11 | # git repo and not in the release tarball, so take care 12 | # to use the github generated source tarball rather than 13 | # the explicitly uploaded source tarball 14 | [download] 15 | url = https://github.com/libevent/libevent/archive/release-2.1.8-stable.tar.gz 16 | sha256 = 316ddb401745ac5d222d7c529ef1eada12f58f6376a66c1118eee803cb70f83d 17 | 18 | [build] 19 | builder = cmake 20 | subdir = libevent-release-2.1.8-stable 21 | 22 | [cmake.defines] 23 | EVENT__DISABLE_TESTS = ON 24 | EVENT__DISABLE_BENCHMARK = ON 25 | EVENT__DISABLE_SAMPLES = ON 26 | EVENT__DISABLE_REGRESS = ON 27 | 28 | [dependencies.not(os=linux)] 29 | openssl 30 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libgit2: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libgit2 3 | 4 | [rpms] 5 | libgit2-devel 6 | 7 | [debs] 8 | libgit2-dev 9 | 10 | [download] 11 | url = https://github.com/libgit2/libgit2/archive/v0.28.1.tar.gz 12 | sha256 = 0ca11048795b0d6338f2e57717370208c2c97ad66c6d5eac0c97a8827d13936b 13 | 14 | [build] 15 | builder = cmake 16 | subdir = libgit2-0.28.1 17 | 18 | [cmake.defines] 19 | # Could turn this on if we also wanted to add a manifest for libssh2 20 | USE_SSH = OFF 21 | BUILD_CLAR = OFF 22 | # Have to build shared to work around annoying problems with cmake 23 | # mis-parsing the frameworks required to link this on macos :-/ 24 | BUILD_SHARED_LIBS = ON 25 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libmnl: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libmnl 3 | 4 | [rpms] 5 | libmnl-devel 6 | libmnl-static 7 | 8 | [debs] 9 | libmnl-dev 10 | 11 | [download] 12 | url = http://www.lg.ps.pl/mirrors/ftp.netfilter.org/libmnl/libmnl-1.0.4.tar.bz2 13 | sha256 = 171f89699f286a5854b72b91d06e8f8e3683064c5901fb09d954a9ab6f551f81 14 | 15 | [build.os=linux] 16 | builder = autoconf 17 | subdir = libmnl-1.0.4 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libnl: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libnl 3 | 4 | [rpms] 5 | libnl3-devel 6 | libnl3 7 | 8 | [debs] 9 | libnl-3-dev 10 | 11 | [download] 12 | url = https://www.infradead.org/~tgr/libnl/files/libnl-3.2.25.tar.gz 13 | sha256 = 8beb7590674957b931de6b7f81c530b85dc7c1ad8fbda015398bc1e8d1ce8ec5 14 | 15 | [build.os=linux] 16 | builder = autoconf 17 | subdir = libnl-3.2.25 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libsai: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libsai 3 | 4 | [download] 5 | url = https://github.com/opencomputeproject/SAI/archive/v1.6.3.tar.gz 6 | sha256 = ff09308fea187885b8f4d86446c5e0c097e801e8fe98de1b5e25cdc80d52e3cb 7 | 8 | [build] 9 | builder = nop 10 | subdir = SAI-1.6.3 11 | 12 | [install.files] 13 | inc = include 14 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libtool: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libtool 3 | 4 | [rpms] 5 | libtool 6 | 7 | [debs] 8 | libtool 9 | 10 | [download] 11 | url = http://ftp.gnu.org/gnu/libtool/libtool-2.4.6.tar.gz 12 | sha256 = e3bd4d5d3d025a36c21dd6af7ea818a2afcd4dfc1ea5a17b39d7854bcd0c06e3 13 | 14 | [build] 15 | builder = autoconf 16 | subdir = libtool-2.4.6 17 | 18 | [dependencies] 19 | automake 20 | 21 | [autoconf.args] 22 | --enable-ltdl-install 23 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libusb: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libusb 3 | 4 | [rpms] 5 | libusb-devel 6 | libusb 7 | 8 | [debs] 9 | libusb-1.0-0-dev 10 | 11 | [download] 12 | url = https://github.com/libusb/libusb/releases/download/v1.0.22/libusb-1.0.22.tar.bz2 13 | sha256 = 75aeb9d59a4fdb800d329a545c2e6799f732362193b465ea198f2aa275518157 14 | 15 | [build.os=linux] 16 | builder = autoconf 17 | subdir = libusb-1.0.22 18 | 19 | [autoconf.args] 20 | # fboss (which added the libusb dep) doesn't need udev so it is disabled here. 21 | # if someone in the future wants to add udev for something else, it won't hurt 22 | # fboss. 23 | --disable-udev 24 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/libzmq: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = libzmq 3 | 4 | [rpms] 5 | zeromq-devel 6 | zeromq 7 | 8 | [debs] 9 | libzmq3-dev 10 | 11 | [download] 12 | url = https://github.com/zeromq/libzmq/releases/download/v4.3.1/zeromq-4.3.1.tar.gz 13 | sha256 = bcbabe1e2c7d0eec4ed612e10b94b112dd5f06fcefa994a0c79a45d835cd21eb 14 | 15 | 16 | [build] 17 | builder = autoconf 18 | subdir = zeromq-4.3.1 19 | 20 | [autoconf.args] 21 | 22 | [dependencies] 23 | autoconf 24 | libtool 25 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/lz4: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = lz4 3 | 4 | [rpms] 5 | lz4-devel 6 | lz4-static 7 | 8 | [debs] 9 | liblz4-dev 10 | 11 | [download] 12 | url = https://github.com/lz4/lz4/archive/v1.8.3.tar.gz 13 | sha256 = 33af5936ac06536805f9745e0b6d61da606a1f8b4cc5c04dd3cbaca3b9b4fc43 14 | 15 | [build] 16 | builder = cmake 17 | subdir = lz4-1.8.3/contrib/cmake_unofficial 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/mvfst: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = mvfst 3 | fbsource_path = fbcode/quic 4 | shipit_project = mvfst 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebookincubator/mvfst.git 9 | 10 | [build] 11 | builder = cmake 12 | subdir = . 13 | 14 | [cmake.defines.test=on] 15 | BUILD_TESTS = ON 16 | 17 | [cmake.defines.all(os=windows, test=on)] 18 | BUILD_TESTS = OFF 19 | 20 | [cmake.defines.test=off] 21 | BUILD_TESTS = OFF 22 | 23 | [dependencies] 24 | folly 25 | fizz 26 | 27 | [dependencies.all(test=on, not(os=windows))] 28 | googletest_1_8 29 | 30 | [shipit.pathmap] 31 | fbcode/quic/public_root = . 32 | fbcode/quic = quic 33 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/nghttp2: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = nghttp2 3 | 4 | [rpms] 5 | libnghttp2-devel 6 | libnghttp2 7 | 8 | [debs] 9 | libnghttp2-dev 10 | 11 | [download] 12 | url = https://github.com/nghttp2/nghttp2/releases/download/v1.39.2/nghttp2-1.39.2.tar.gz 13 | sha256 = fc820a305e2f410fade1a3260f09229f15c0494fc089b0100312cd64a33a38c0 14 | 15 | [build] 16 | builder = autoconf 17 | subdir = nghttp2-1.39.2 18 | 19 | [autoconf.args] 20 | --enable-lib-only 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/nmap: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = nmap 3 | 4 | [rpms] 5 | nmap 6 | 7 | [debs] 8 | nmap 9 | 10 | [download.not(os=windows)] 11 | url = https://api.github.com/repos/nmap/nmap/tarball/ef8213a36c2e89233c806753a57b5cd473605408 12 | sha256 = eda39e5a8ef4964fac7db16abf91cc11ff568eac0fa2d680b0bfa33b0ed71f4a 13 | 14 | [build.not(os=windows)] 15 | builder = autoconf 16 | subdir = nmap-nmap-ef8213a 17 | build_in_src_dir = true 18 | 19 | [build.os=windows] 20 | builder = nop 21 | 22 | [autoconf.args] 23 | # Without this option the build was filing to find some third party libraries 24 | # that we don't need 25 | enable_rdma=no 26 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/openr: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = openr 3 | fbsource_path = facebook/openr 4 | shipit_project = openr 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/openr.git 9 | 10 | [build.os=linux] 11 | builder = cmake 12 | 13 | [build.not(os=linux)] 14 | # boost.fiber is required and that is not available on macos. 15 | # libzmq doesn't currently build on windows. 16 | builder = nop 17 | 18 | [dependencies] 19 | boost 20 | fb303 21 | fbthrift 22 | fbzmq 23 | folly 24 | googletest 25 | re2 26 | 27 | [cmake.defines.test=on] 28 | BUILD_TESTS=ON 29 | ADD_ROOT_TESTS=OFF 30 | 31 | [cmake.defines.test=off] 32 | BUILD_TESTS=OFF 33 | 34 | 35 | [shipit.pathmap] 36 | fbcode/openr = openr 37 | fbcode/openr/public_tld = . 38 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/openssl: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = openssl 3 | 4 | [rpms] 5 | openssl-devel 6 | openssl 7 | 8 | [debs] 9 | libssl-dev 10 | 11 | [download] 12 | url = https://www.openssl.org/source/openssl-1.1.1f.tar.gz 13 | sha256 = 186c6bfe6ecfba7a5b48c47f8a1673d0f3b0e5ba2e25602dd23b629975da3f35 14 | 15 | [build] 16 | builder = openssl 17 | subdir = openssl-1.1.1f 18 | 19 | [dependencies.os=windows] 20 | perl 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/osxfuse: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = osxfuse 3 | 4 | [download] 5 | url = https://github.com/osxfuse/osxfuse/archive/osxfuse-3.8.3.tar.gz 6 | sha256 = 93bab6731bdfe8dc1ef069483437270ce7fe5a370f933d40d8d0ef09ba846c0c 7 | 8 | [build] 9 | builder = nop 10 | 11 | [install.files] 12 | osxfuse-osxfuse-3.8.3/common = include 13 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/patchelf: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = patchelf 3 | 4 | [rpms] 5 | patchelf 6 | 7 | [debs] 8 | patchelf 9 | 10 | [download] 11 | url = https://github.com/NixOS/patchelf/archive/0.10.tar.gz 12 | sha256 = b3cb6bdedcef5607ce34a350cf0b182eb979f8f7bc31eae55a93a70a3f020d13 13 | 14 | [build] 15 | builder = autoconf 16 | subdir = patchelf-0.10 17 | 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/pcre: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = pcre 3 | 4 | [rpms] 5 | pcre-devel 6 | pcre-static 7 | 8 | [debs] 9 | libpcre3-dev 10 | 11 | [download] 12 | url = https://ftp.pcre.org/pub/pcre/pcre-8.43.tar.gz 13 | sha256 = 0b8e7465dc5e98c757cc3650a20a7843ee4c3edf50aaf60bb33fd879690d2c73 14 | 15 | [build] 16 | builder = cmake 17 | subdir = pcre-8.43 18 | 19 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/perl: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = perl 3 | 4 | [download.os=windows] 5 | url = http://strawberryperl.com/download/5.28.1.1/strawberry-perl-5.28.1.1-64bit-portable.zip 6 | sha256 = 935c95ba096fa11c4e1b5188732e3832d330a2a79e9882ab7ba8460ddbca810d 7 | 8 | [build.os=windows] 9 | builder = nop 10 | subdir = perl 11 | 12 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/pexpect: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = pexpect 3 | 4 | [download] 5 | url = https://files.pythonhosted.org/packages/0e/3e/377007e3f36ec42f1b84ec322ee12141a9e10d808312e5738f52f80a232c/pexpect-4.7.0-py2.py3-none-any.whl 6 | sha256 = 2094eefdfcf37a1fdbfb9aa090862c1a4878e5c7e0e7e7088bdb511c558e5cd1 7 | 8 | [build] 9 | builder = python-wheel 10 | 11 | [dependencies] 12 | python-ptyprocess 13 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/proxygen: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = proxygen 3 | fbsource_path = fbcode/proxygen 4 | shipit_project = proxygen 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/proxygen.git 9 | 10 | [build.os=windows] 11 | builder = nop 12 | 13 | [build] 14 | builder = cmake 15 | subdir = . 16 | 17 | [cmake.defines] 18 | BUILD_QUIC = ON 19 | 20 | [cmake.defines.test=on] 21 | BUILD_TESTS = ON 22 | 23 | [cmake.defines.test=off] 24 | BUILD_TESTS = OFF 25 | 26 | [dependencies] 27 | gperf 28 | folly 29 | fizz 30 | wangle 31 | mvfst 32 | 33 | [dependencies.test=on] 34 | googletest_1_8 35 | 36 | [shipit.pathmap] 37 | fbcode/proxygen/public_tld = . 38 | fbcode/proxygen = proxygen 39 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/python: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = python 3 | 4 | [rpms] 5 | python3 6 | python3-devel 7 | 8 | [debs] 9 | python3-all-dev 10 | 11 | [download.os=linux] 12 | url = https://www.python.org/ftp/python/3.7.6/Python-3.7.6.tgz 13 | sha256 = aeee681c235ad336af116f08ab6563361a0c81c537072c1b309d6e4050aa2114 14 | 15 | [build.os=linux] 16 | builder = autoconf 17 | subdir = Python-3.7.6 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/python-click: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = python-click 3 | 4 | [download] 5 | url = https://files.pythonhosted.org/packages/d2/3d/fa76db83bf75c4f8d338c2fd15c8d33fdd7ad23a9b5e57eb6c5de26b430e/click-7.1.2-py2.py3-none-any.whl 6 | sha256 = dacca89f4bfadd5de3d7489b7c8a566eee0d3676333fbb50030263894c38c0dc 7 | 8 | [build] 9 | builder = python-wheel 10 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/python-dulwich: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = python-dulwich 3 | 4 | # The below links point to custom github forks of project dulwich, because the 5 | # 0.18.6 version didn't have an official rollout of wheel packages. 6 | 7 | [download.os=linux] 8 | url = https://github.com/lukaspiatkowski/dulwich/releases/download/dulwich-0.18.6-wheel/dulwich-0.18.6-cp36-cp36m-linux_x86_64.whl 9 | sha256 = e96f545f3d003e67236785473caaba2c368e531ea85fd508a3bd016ebac3a6d8 10 | 11 | [download.os=darwin] 12 | url = https://github.com/lukaspiatkowski/dulwich/releases/download/dulwich-0.18.6-wheel/dulwich-0.18.6-cp37-cp37m-macosx_10_14_x86_64.whl 13 | sha256 = 8373652056284ad40ea5220b659b3489b0a91f25536322345a3e4b5d29069308 14 | 15 | [build.not(os=windows)] 16 | builder = python-wheel 17 | 18 | [build.os=windows] 19 | builder = nop 20 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/python-ptyprocess: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = python-ptyprocess 3 | 4 | [download] 5 | url = https://files.pythonhosted.org/packages/d1/29/605c2cc68a9992d18dada28206eeada56ea4bd07a239669da41674648b6f/ptyprocess-0.6.0-py2.py3-none-any.whl 6 | sha256 = d7cc528d76e76342423ca640335bd3633420dc1366f258cb31d05e865ef5ca1f 7 | 8 | [build] 9 | builder = python-wheel 10 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/python-six: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = python-six 3 | 4 | [download] 5 | url = https://files.pythonhosted.org/packages/73/fb/00a976f728d0d1fecfe898238ce23f502a721c0ac0ecfedb80e0d88c64e9/six-1.12.0-py2.py3-none-any.whl 6 | sha256 = 3350809f0555b11f552448330d0b52d5f24c91a322ea4a15ef22629740f3761c 7 | 8 | [build] 9 | builder = python-wheel 10 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/python-toml: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = python-toml 3 | 4 | [download] 5 | url = https://files.pythonhosted.org/packages/a2/12/ced7105d2de62fa7c8fb5fce92cc4ce66b57c95fb875e9318dba7f8c5db0/toml-0.10.0-py2.py3-none-any.whl 6 | sha256 = 235682dd292d5899d361a811df37e04a8828a5b1da3115886b73cf81ebc9100e 7 | 8 | [build] 9 | builder = python-wheel 10 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/re2: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = re2 3 | 4 | [rpms] 5 | re2 6 | re2-devel 7 | 8 | [debs] 9 | libre2-dev 10 | 11 | [download] 12 | url = https://github.com/google/re2/archive/2019-06-01.tar.gz 13 | sha256 = 02b7d73126bd18e9fbfe5d6375a8bb13fadaf8e99e48cbb062e4500fc18e8e2e 14 | 15 | [build] 16 | builder = cmake 17 | subdir = re2-2019-06-01 18 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/snappy: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = snappy 3 | 4 | [rpms] 5 | snappy 6 | snappy-devel 7 | 8 | [debs] 9 | libsnappy-dev 10 | 11 | [download] 12 | url = https://github.com/google/snappy/archive/1.1.7.tar.gz 13 | sha256 = 3dfa02e873ff51a11ee02b9ca391807f0c8ea0529a4924afa645fbf97163f9d4 14 | 15 | [build] 16 | builder = cmake 17 | subdir = snappy-1.1.7 18 | 19 | [cmake.defines] 20 | SNAPPY_BUILD_TESTS = OFF 21 | 22 | # Avoid problems like `relocation R_X86_64_PC32 against symbol` on ELF systems 23 | # when linking rocksdb, which builds PIC even when building a static lib 24 | [cmake.defines.os=linux] 25 | BUILD_SHARED_LIBS = ON 26 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/sqlite3: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = sqlite3 3 | 4 | [rpms] 5 | sqlite-devel 6 | sqlite-libs 7 | 8 | [debs] 9 | libsqlite3-dev 10 | 11 | [download] 12 | url = https://sqlite.org/2019/sqlite-amalgamation-3280000.zip 13 | sha256 = d02fc4e95cfef672b45052e221617a050b7f2e20103661cda88387349a9b1327 14 | 15 | [dependencies] 16 | cmake 17 | ninja 18 | 19 | [build] 20 | builder = sqlite 21 | subdir = sqlite-amalgamation-3280000 22 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/sqlite3-bin: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = sqlite3-bin 3 | 4 | [rpms] 5 | sqlite 6 | 7 | [debs] 8 | sqlite3 9 | 10 | [download.os=linux] 11 | url = https://github.com/sqlite/sqlite/archive/version-3.33.0.tar.gz 12 | sha256 = 48e5f989eefe9af0ac758096f82ead0f3c7b58118ac17cc5810495bd5084a331 13 | 14 | [build.os=linux] 15 | builder = autoconf 16 | subdir = sqlite-version-3.33.0 17 | 18 | [build.not(os=linux)] 19 | # MacOS comes with sqlite3 preinstalled and don't need Windows here 20 | builder = nop 21 | 22 | [dependencies.os=linux] 23 | tcl 24 | 25 | [autoconf.args] 26 | # This flag disabled tcl as a runtime library used for some functionality, 27 | # but tcl is still a required dependency as it is used by the build files 28 | --disable-tcl 29 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/tcl: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = tcl 3 | 4 | [rpms] 5 | tcl 6 | 7 | [debs] 8 | tcl 9 | 10 | [download] 11 | url = https://github.com/tcltk/tcl/archive/core-8-7a3.tar.gz 12 | sha256 = 22d748f0c9652f3ecc195fed3f24a1b6eea8d449003085e6651197951528982e 13 | 14 | [build.os=linux] 15 | builder = autoconf 16 | subdir = tcl-core-8-7a3/unix 17 | 18 | [build.not(os=linux)] 19 | # This is for sqlite3 on Linux for now 20 | builder = nop 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/wangle: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = wangle 3 | fbsource_path = fbcode/wangle 4 | shipit_project = wangle 5 | shipit_fbcode_builder = true 6 | 7 | [git] 8 | repo_url = https://github.com/facebook/wangle.git 9 | 10 | [build] 11 | builder = cmake 12 | subdir = wangle 13 | 14 | [cmake.defines.test=on] 15 | BUILD_TESTS=ON 16 | 17 | [cmake.defines.test=off] 18 | BUILD_TESTS=OFF 19 | 20 | [dependencies] 21 | folly 22 | googletest 23 | fizz 24 | 25 | [shipit.pathmap] 26 | fbcode/wangle/public_tld = . 27 | fbcode/wangle = wangle 28 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/zlib: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = zlib 3 | 4 | [rpms] 5 | zlib-devel 6 | zlib-static 7 | 8 | [debs] 9 | zlib1g-dev 10 | 11 | [download] 12 | url = http://www.zlib.net/zlib-1.2.11.tar.gz 13 | sha256 = c3e5e9fdd5004dcb542feda5ee4f0ff0744628baf8ed2dd5d66f8ca1197cb1a1 14 | 15 | [build.os=windows] 16 | builder = cmake 17 | subdir = zlib-1.2.11 18 | 19 | # Every platform but windows ships with zlib, so just skip 20 | # building on not(windows) 21 | [build.not(os=windows)] 22 | builder = nop 23 | -------------------------------------------------------------------------------- /build/fbcode_builder/manifests/zstd: -------------------------------------------------------------------------------- 1 | [manifest] 2 | name = zstd 3 | 4 | [rpms] 5 | libzstd-devel 6 | libzstd 7 | 8 | [debs] 9 | libzstd-dev 10 | 11 | [download] 12 | url = https://github.com/facebook/zstd/releases/download/v1.4.5/zstd-1.4.5.tar.gz 13 | sha256 = 98e91c7c6bf162bf90e4e70fdbc41a8188b9fa8de5ad840c401198014406ce9e 14 | 15 | [build] 16 | builder = cmake 17 | subdir = zstd-1.4.5/build/cmake 18 | 19 | # The zstd cmake build explicitly sets the install name 20 | # for the shared library in such a way that cmake discards 21 | # the path to the library from the install_name, rendering 22 | # the library non-resolvable during the build. The short 23 | # term solution for this is just to link static on macos. 24 | [cmake.defines.os=darwin] 25 | ZSTD_BUILD_SHARED = OFF 26 | 27 | [cmake.defines.os=windows] 28 | ZSTD_BUILD_SHARED = OFF 29 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/build/fbcode_builder/specs/__init__.py -------------------------------------------------------------------------------- /build/fbcode_builder/specs/fbthrift.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | import specs.fizz as fizz 9 | import specs.fmt as fmt 10 | import specs.folly as folly 11 | import specs.sodium as sodium 12 | import specs.wangle as wangle 13 | import specs.zstd as zstd 14 | 15 | 16 | def fbcode_builder_spec(builder): 17 | return { 18 | 'depends_on': [fmt, folly, fizz, sodium, wangle, zstd], 19 | 'steps': [ 20 | builder.fb_github_cmake_install('fbthrift/thrift'), 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/fmt.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | 9 | def fbcode_builder_spec(builder): 10 | builder.add_option('fmtlib/fmt:git_hash', '6.2.1') 11 | return { 12 | 'steps': [ 13 | builder.github_project_workdir('fmtlib/fmt', 'build'), 14 | builder.cmake_install('fmtlib/fmt'), 15 | ], 16 | } 17 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/folly.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | 9 | def fbcode_builder_spec(builder): 10 | return { 11 | 'steps': [ 12 | # on macOS the filesystem is typically case insensitive. 13 | # We need to ensure that the CWD is not the folly source 14 | # dir when we build, otherwise the system will decide 15 | # that `folly/String.h` is the file it wants when including 16 | # `string.h` and the build will fail. 17 | builder.fb_github_project_workdir('folly/_build'), 18 | builder.cmake_install('facebook/folly'), 19 | ], 20 | } 21 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/gmock.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | 9 | def fbcode_builder_spec(builder): 10 | builder.add_option('google/googletest:git_hash', 'release-1.8.1') 11 | builder.add_option( 12 | 'google/googletest:cmake_defines', 13 | { 14 | 'BUILD_GTEST': 'ON', 15 | # Avoid problems with MACOSX_RPATH 16 | 'BUILD_SHARED_LIBS': 'OFF', 17 | } 18 | ) 19 | return { 20 | 'steps': [ 21 | builder.github_project_workdir('google/googletest', 'build'), 22 | builder.cmake_install('google/googletest'), 23 | ], 24 | } 25 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/re2.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | 9 | def fbcode_builder_spec(builder): 10 | return { 11 | 'steps': [ 12 | builder.github_project_workdir('google/re2', 'build'), 13 | builder.cmake_install('google/re2'), 14 | ], 15 | } 16 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/rocksdb.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | 9 | def fbcode_builder_spec(builder): 10 | builder.add_option("rocksdb/_build:cmake_defines", { 11 | "USE_RTTI": "1", 12 | "PORTABLE": "ON", 13 | }) 14 | return { 15 | "steps": [ 16 | builder.fb_github_cmake_install("rocksdb/_build"), 17 | ], 18 | } 19 | -------------------------------------------------------------------------------- /build/fbcode_builder/specs/sodium.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | # Copyright (c) Facebook, Inc. and its affiliates. 3 | from __future__ import absolute_import 4 | from __future__ import division 5 | from __future__ import print_function 6 | from __future__ import unicode_literals 7 | 8 | from shell_quoting import ShellQuoted 9 | 10 | 11 | def fbcode_builder_spec(builder): 12 | builder.add_option('jedisct1/libsodium:git_hash', 'stable') 13 | return { 14 | 'steps': [ 15 | builder.github_project_workdir('jedisct1/libsodium', '.'), 16 | builder.step('Build and install jedisct1/libsodium', [ 17 | builder.run(ShellQuoted('./autogen.sh')), 18 | builder.configure(), 19 | builder.make_and_install(), 20 | ]), 21 | ], 22 | } 23 | -------------------------------------------------------------------------------- /common/README.md: -------------------------------------------------------------------------------- 1 | This directory mostly contains stub implementations of Facebook libraries that 2 | are not fully open source yet. These stubs allow the LogDevice code to build while 3 | we are still working on fully open sourcing these libraries. 4 | 5 | The code in common/stats is the main piece that is not fully open source yet. 6 | We are working to eventually make all of this code available in the 7 | facebook/folly repository. 8 | -------------------------------------------------------------------------------- /docs/assets/LogDevice_Consensus_deepdive.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/LogDevice_Consensus_deepdive.pdf -------------------------------------------------------------------------------- /docs/assets/admin_server_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/admin_server_overview.png -------------------------------------------------------------------------------- /docs/assets/ldshell-check-impact-example.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-check-impact-example.png -------------------------------------------------------------------------------- /docs/assets/ldshell-maintenance-capacity-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-maintenance-capacity-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-maintenance-completed-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-maintenance-completed-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-maintenance-drain-two-nodes-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-maintenance-drain-two-nodes-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-maintenance-drain-two-nodes-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-maintenance-drain-two-nodes-2.png -------------------------------------------------------------------------------- /docs/assets/ldshell-maintenance-rebuilding-stall-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-maintenance-rebuilding-stall-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-maintenance-safe-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-maintenance-safe-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-screenshot-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-screenshot-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-status-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-status-1.png -------------------------------------------------------------------------------- /docs/assets/ldshell-status-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-status-2.png -------------------------------------------------------------------------------- /docs/assets/ldshell-status-completed-maintenance-1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/ldshell-status-completed-maintenance-1.png -------------------------------------------------------------------------------- /docs/assets/logsdb/SST_files.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/logsdb/SST_files.png -------------------------------------------------------------------------------- /docs/assets/maintenance-manager-design.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/maintenance-manager-design.jpg -------------------------------------------------------------------------------- /docs/assets/readpath/read_overview.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/readpath/read_overview.png -------------------------------------------------------------------------------- /docs/assets/readpath/read_path_table_3nodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/readpath/read_path_table_3nodes.png -------------------------------------------------------------------------------- /docs/assets/readpath/read_path_table_twonodes.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/readpath/read_path_table_twonodes.png -------------------------------------------------------------------------------- /docs/assets/readpath/read_sliding_window.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/readpath/read_sliding_window.png -------------------------------------------------------------------------------- /docs/assets/readpath/read_start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/readpath/read_start.png -------------------------------------------------------------------------------- /docs/assets/readpath/records_send.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/readpath/records_send.png -------------------------------------------------------------------------------- /docs/assets/rebuilding/drain_is_false_flow.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/drain_is_false_flow.graffle -------------------------------------------------------------------------------- /docs/assets/rebuilding/drain_is_false_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/drain_is_false_flow.png -------------------------------------------------------------------------------- /docs/assets/rebuilding/drain_is_true_flow.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/drain_is_true_flow.graffle -------------------------------------------------------------------------------- /docs/assets/rebuilding/drain_is_true_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/drain_is_true_flow.png -------------------------------------------------------------------------------- /docs/assets/rebuilding/mini_rebuilding_flow.graffle: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/mini_rebuilding_flow.graffle -------------------------------------------------------------------------------- /docs/assets/rebuilding/mini_rebuilding_flow.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/mini_rebuilding_flow.png -------------------------------------------------------------------------------- /docs/assets/rebuilding/rebuilding_copyset.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/rebuilding/rebuilding_copyset.png -------------------------------------------------------------------------------- /docs/assets/record_placement.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/record_placement.jpg -------------------------------------------------------------------------------- /docs/assets/recovery/after_recovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/recovery/after_recovery.png -------------------------------------------------------------------------------- /docs/assets/recovery/final_consensus_state.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/recovery/final_consensus_state.png -------------------------------------------------------------------------------- /docs/assets/recovery/node_and_sequencer_fail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/recovery/node_and_sequencer_fail.png -------------------------------------------------------------------------------- /docs/assets/recovery/records_after_recovery.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/recovery/records_after_recovery.png -------------------------------------------------------------------------------- /docs/assets/recovery/steadystate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/recovery/steadystate.png -------------------------------------------------------------------------------- /docs/assets/replication/epoch_segments_of_a_log.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/replication/epoch_segments_of_a_log.png -------------------------------------------------------------------------------- /docs/assets/replication/historical_epoch_segments.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/replication/historical_epoch_segments.png -------------------------------------------------------------------------------- /docs/assets/replication/log_replication_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/replication/log_replication_configuration.png -------------------------------------------------------------------------------- /docs/assets/replication/replication_configuration.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/replication/replication_configuration.png -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/Logdevice_bandwidth_bucket.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/Logdevice_bandwidth_bucket.jpg -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/Logdevice_bw_overflow_capture.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/Logdevice_bw_overflow_capture.jpg -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/Logdevice_flowgroup.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/Logdevice_flowgroup.jpg -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/Logdevice_last_overflow_application.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/Logdevice_last_overflow_application.jpg -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/Logdevice_priorityq_last_overflow.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/Logdevice_priorityq_last_overflow.jpg -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/Logdevice_worker_flowgroups.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/Logdevice_worker_flowgroups.jpg -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/traffic_shaping_configuring.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/traffic_shaping_configuring.png -------------------------------------------------------------------------------- /docs/assets/traffic_shaping/traffic_shaping_graphics.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/traffic_shaping/traffic_shaping_graphics.png -------------------------------------------------------------------------------- /docs/assets/writepath/out_of_order_ack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/writepath/out_of_order_ack.png -------------------------------------------------------------------------------- /docs/assets/writepath/replication_property.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/writepath/replication_property.png -------------------------------------------------------------------------------- /docs/assets/writepath/write_path.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/writepath/write_path.mov -------------------------------------------------------------------------------- /docs/assets/writepath/write_path_logdevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/docs/assets/writepath/write_path_logdevice.png -------------------------------------------------------------------------------- /docs/doxygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: API_Doxygen 3 | title: Reference 4 | sidebar_label: Reference 5 | --- 6 | [**The LogDevice C++ API reference is generated using Doxygen**](../api/annotated.html). 7 | -------------------------------------------------------------------------------- /k8s/kustomization.yaml: -------------------------------------------------------------------------------- 1 | # This is a configmap generator for the cluster config. It will get mounted 2 | # to the daemon as a file that gets automatically updated when the config map 3 | # content changes. 4 | configMapGenerator: 5 | - name: logdevice-config 6 | files: 7 | - config.json 8 | resources: 9 | - logdevice-statefulset.yaml 10 | - logdevice-service.yaml 11 | - logdevice-admin-server.yaml 12 | generatorOptions: 13 | disableNameSuffixHash: true 14 | -------------------------------------------------------------------------------- /k8s/logdevice-service.yaml: -------------------------------------------------------------------------------- 1 | apiVersion: v1 2 | kind: Service 3 | metadata: 4 | name: logdevice 5 | labels: 6 | app: logdevice 7 | spec: 8 | clusterIP: None 9 | selector: 10 | app: logdevice 11 | -------------------------------------------------------------------------------- /logdevice/.gitignore: -------------------------------------------------------------------------------- 1 | *.o 2 | *.so 3 | *.la 4 | *.a 5 | *.so.* 6 | tags 7 | Makefile 8 | CMakeCache.txt 9 | CMakeFiles/ 10 | cmake_install.cmake 11 | **/__pycache__/ 12 | **/*.pyc 13 | *.egg-info 14 | -------------------------------------------------------------------------------- /logdevice/CMake/FindJeMalloc.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(JEMALLOC_ROOT_DIR 8 | NAMES include/jemalloc/jemalloc.h 9 | ) 10 | 11 | find_library(JEMALLOC_LIBRARIES 12 | NAMES jemalloc 13 | HINTS ${JEMALLOC_ROOT_DIR}/lib 14 | ) 15 | 16 | find_path(JEMALLOC_INCLUDE_DIR 17 | NAMES jemalloc/jemalloc.h 18 | HINTS ${JEMALLOC_ROOT_DIR}/include 19 | ) 20 | 21 | include(FindPackageHandleStandardArgs) 22 | find_package_handle_standard_args(JeMalloc DEFAULT_MSG 23 | JEMALLOC_LIBRARIES 24 | JEMALLOC_INCLUDE_DIR 25 | ) 26 | 27 | mark_as_advanced( 28 | JEMALLOC_ROOT_DIR 29 | JEMALLOC_LIBRARIES 30 | JEMALLOC_INCLUDE_DIR 31 | ) 32 | -------------------------------------------------------------------------------- /logdevice/CMake/FindLZ4.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(LZ4_INCLUDE_DIR NAMES lz4.h) 8 | find_library(LZ4_LIBRARY NAMES lz4) 9 | 10 | include(FindPackageHandleStandardArgs) 11 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( 12 | LZ4 DEFAULT_MSG 13 | LZ4_LIBRARY LZ4_INCLUDE_DIR) 14 | 15 | if (NOT LZ4_FOUND) 16 | message(STATUS "Using third-party bundled LZ4") 17 | else() 18 | message(STATUS "Found LZ4: ${LZ4_LIBRARY}") 19 | endif (NOT LZ4_FOUND) 20 | 21 | mark_as_advanced(LZ4_INCLUDE_DIR LZ4_LIBRARY) 22 | -------------------------------------------------------------------------------- /logdevice/CMake/FindLibIberty.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | FIND_LIBRARY(IBERTY_LIBRARIES 8 | NAMES iberty_pic iberty) 9 | 10 | IF (IBERTY_LIBRARIES) 11 | 12 | # show which libiberty was found only if not quiet 13 | MESSAGE( STATUS "Found libiberty: ${IBERTY_LIBRARIES}") 14 | 15 | SET(IBERTY_FOUND TRUE) 16 | 17 | ELSE (IBERTY_LIBRARIES) 18 | 19 | IF ( IBERTY_FIND_REQUIRED) 20 | MESSAGE(FATAL_ERROR "Could not find libiberty. Try to install binutil-devel?") 21 | ELSE() 22 | MESSAGE(STATUS "Could not find libiberty; downloading binutils and building PIC libiberty.") 23 | ENDIF (IBERTY_FIND_REQUIRED) 24 | 25 | ENDIF (IBERTY_LIBRARIES) 26 | 27 | -------------------------------------------------------------------------------- /logdevice/CMake/FindLibsodium.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(LIBSODIUM_INCLUDE_DIR NAMES sodium.h) 8 | mark_as_advanced(LIBSODIUM_INCLUDE_DIR) 9 | 10 | find_library(LIBSODIUM_LIBRARY NAMES sodium) 11 | mark_as_advanced(LIBSODIUM_LIBRARY) 12 | 13 | include(FindPackageHandleStandardArgs) 14 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( 15 | LIBSODIUM 16 | REQUIRED_VARS LIBSODIUM_LIBRARY LIBSODIUM_INCLUDE_DIR) 17 | 18 | if(LIBSODIUM_FOUND) 19 | set(LIBSODIUM_LIBRARIES ${LIBSODIUM_LIBRARY}) 20 | set(LIBSODIUM_INCLUDE_DIRS ${LIBSODIUM_INCLUDE_DIR}) 21 | message(STATUS "Found Libsodium: ${LIBSODIUM_LIBRARY}") 22 | endif() 23 | -------------------------------------------------------------------------------- /logdevice/CMake/FindSnappy.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(SNAPPY_INCLUDE_DIR NAMES snappy.h) 8 | find_library(SNAPPY_LIBRARY NAMES snappy) 9 | 10 | include(FindPackageHandleStandardArgs) 11 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( 12 | SNAPPY DEFAULT_MSG 13 | SNAPPY_LIBRARY SNAPPY_INCLUDE_DIR) 14 | 15 | if (NOT SNAPPY_FOUND) 16 | message(STATUS "Using third-party bundled Snappy") 17 | else() 18 | message(STATUS "Found Snappy: ${SNAPPY_LIBRARY}") 19 | endif (NOT SNAPPY_FOUND) 20 | 21 | mark_as_advanced(SNAPPY_INCLUDE_DIR SNAPPY_LIBRARY) 22 | -------------------------------------------------------------------------------- /logdevice/CMake/FindSqlite.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(SQLITE_INCLUDE_DIR NAMES sqlite3.h) 8 | find_library(SQLITE_LIBRARY NAMES sqlite3) 9 | 10 | include(FindPackageHandleStandardArgs) 11 | FIND_PACKAGE_HANDLE_STANDARD_ARGS( 12 | SQLITE DEFAULT_MSG 13 | SQLITE_LIBRARY SQLITE_INCLUDE_DIR) 14 | 15 | if (NOT SQLITE_FOUND) 16 | message(STATUS "Using third-party bundled SQLite") 17 | else() 18 | message(STATUS "Found SQLite: ${SQLITE_LIBRARY}") 19 | endif (NOT SQLITE_FOUND) 20 | 21 | mark_as_advanced(SQLITE_INCLUDE_DIR SQLITE_LIBRARY) 22 | -------------------------------------------------------------------------------- /logdevice/CMake/FindZookeeper.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(Zookeeper_INCLUDE_DIR zookeeper/zookeeper.h) 8 | 9 | find_library(Zookeeper_LIBRARY NAMES zookeeper_mt libzookeeper_mt) 10 | 11 | set(Zookeeper_LIBRARIES ${Zookeeper_LIBRARY} ) 12 | set(Zookeeper_INCLUDE_DIRS ${Zookeeper_INCLUDE_DIR} ) 13 | 14 | include(FindPackageHandleStandardArgs) 15 | find_package_handle_standard_args(Zookeeper DEFAULT_MSG 16 | Zookeeper_LIBRARY Zookeeper_INCLUDE_DIR) 17 | 18 | mark_as_advanced(Zookeeper_INCLUDE_DIR Zookeeper_LIBRARY) 19 | -------------------------------------------------------------------------------- /logdevice/CMake/FindZstd.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | find_path(ZSTD_INCLUDE_DIR zstd.h) 8 | 9 | find_library(ZSTD_LIBRARY NAMES zstd) 10 | 11 | if (ZSTD_INCLUDE_DIR AND ZSTD_LIBRARY) 12 | set(ZSTD_FOUND TRUE) 13 | message(STATUS "Found ZSTD library: ${ZSTD_LIBRARY}") 14 | endif () 15 | -------------------------------------------------------------------------------- /logdevice/CMake/build-docs.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | add_custom_target(settings.md 8 | COMMAND logdeviced --markdown-settings > settings.md 9 | WORKING_DIRECTORY ${LOGDEVICE_DIR}/../docs 10 | DEPENDS logdeviced) 11 | 12 | add_custom_target(ldquery.md 13 | COMMAND markdown-ldquery > ldquery.md 14 | WORKING_DIRECTORY ${LOGDEVICE_DIR}/../docs/administration 15 | DEPENDS markdown-ldquery) 16 | 17 | add_custom_target(client-api-doxy 18 | COMMAND rm -rf website/static/api && doxygen logdevice/Doxyfile 19 | WORKING_DIRECTORY ${LOGDEVICE_DIR}/..) 20 | 21 | add_custom_target(docs) 22 | add_dependencies(docs settings.md ldquery.md client-api-doxy) 23 | -------------------------------------------------------------------------------- /logdevice/admin/CheckImpactHandler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | #include "logdevice/admin/AdminAPIHandlerBase.h" 14 | #include "logdevice/common/NodeID.h" 15 | #include "logdevice/common/types_internal.h" 16 | 17 | namespace facebook { namespace logdevice { 18 | 19 | class CheckImpactHandler : public virtual AdminAPIHandlerBase { 20 | public: 21 | // check admin.thrift for documentation 22 | virtual folly::SemiFuture> 23 | semifuture_checkImpact( 24 | std::unique_ptr request) override; 25 | }; 26 | }} // namespace facebook::logdevice 27 | -------------------------------------------------------------------------------- /logdevice/admin/NodesConfigAPIHandler.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #pragma once 10 | 11 | #include 12 | 13 | #include "logdevice/admin/AdminAPIHandlerBase.h" 14 | #include "logdevice/common/NodeID.h" 15 | #include "logdevice/common/types_internal.h" 16 | 17 | namespace facebook { namespace logdevice { 18 | 19 | class NodesConfigAPIHandler : public virtual AdminAPIHandlerBase { 20 | public: 21 | virtual void 22 | // See admin.thrift for documentation 23 | getNodesConfig(thrift::NodesConfigResponse&, 24 | std::unique_ptr filter) override; 25 | }; 26 | }} // namespace facebook::logdevice 27 | -------------------------------------------------------------------------------- /logdevice/admin/if/admin_commands.thrift: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | namespace cpp2 facebook.logdevice.thrift 10 | namespace go logdevice.admin.if.admin_commands 11 | namespace py3 logdevice.admin 12 | namespace php LogDevice 13 | namespace wiki Thriftdoc.LogDevice.AdminCommands 14 | 15 | struct AdminCommandRequest { 16 | 1: string request; 17 | } 18 | 19 | struct AdminCommandResponse { 20 | 1: string response; 21 | } 22 | -------------------------------------------------------------------------------- /logdevice/admin/maintenance/EventLogWriter.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | **/ 8 | 9 | #include "logdevice/admin/maintenance/EventLogWriter.h" 10 | 11 | #include "logdevice/admin/maintenance/MaintenanceManager.h" 12 | 13 | namespace facebook { namespace logdevice { namespace maintenance { 14 | 15 | void EventLogWriter::writeToEventLog( 16 | std::unique_ptr event, 17 | std::function< 18 | void(Status st, lsn_t version, const std::string& /* unused */)> cb) 19 | const { 20 | ld_check(event != nullptr); 21 | event_log_.writeDelta(*event, cb); 22 | } 23 | 24 | }}} // namespace facebook::logdevice::maintenance 25 | -------------------------------------------------------------------------------- /logdevice/admin/maintenance/MaintenanceDelta.thrift: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | include "logdevice/admin/if/maintenance.thrift" 10 | 11 | 12 | namespace cpp2 facebook.logdevice.maintenance 13 | 14 | union MaintenanceDelta { 15 | 1: list apply_maintenances, 16 | 2: maintenance.RemoveMaintenancesRequest remove_maintenances, 17 | } 18 | -------------------------------------------------------------------------------- /logdevice/admin/test/SafetyCheckerTest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/admin/safety/SafetyChecker.h" 9 | 10 | #include 11 | 12 | using namespace facebook::logdevice; 13 | 14 | TEST(SafetyCheckerTest, Parse) { 15 | SafetyMargin safety_margin1; 16 | ASSERT_EQ(0, parseSafetyMargin("rack:3", safety_margin1)); 17 | ASSERT_EQ(3, safety_margin1[NodeLocationScope::RACK]); 18 | 19 | SafetyMargin safety_margin2; 20 | ASSERT_EQ(0, parseSafetyMargin("rack:2,node:5", safety_margin2)); 21 | ASSERT_EQ(2, safety_margin2[NodeLocationScope::RACK]); 22 | ASSERT_EQ(5, safety_margin2[NodeLocationScope::NODE]); 23 | } 24 | -------------------------------------------------------------------------------- /logdevice/build_tools/ubuntu_runtime.deps: -------------------------------------------------------------------------------- 1 | libunwind8 2 | libboost-filesystem1.65.1 3 | libboost-program-options1.65.1 4 | libboost-regex1.65.1 5 | libboost-thread1.65.1 6 | libssl1.1 7 | libevent-2.1-6 8 | libevent-openssl-2.1-6 9 | libdouble-conversion1 10 | libzookeeper-mt2 11 | libgoogle-glog0v5 12 | libjemalloc1 13 | libsnappy1v5 14 | libpython3.6 15 | python3-pip 16 | libboost-python1.65.1 17 | libboost-context1.65.1 18 | libsodium-dev 19 | libzstd-dev 20 | -------------------------------------------------------------------------------- /logdevice/clients/python/util/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | auto_sources(hfiles "*.h" RECURSE "${LOGDEVICE_PYTHON_CLIENT_DIR}/util") 8 | auto_sources(files "*.cpp" RECURSE "${LOGDEVICE_PYTHON_CLIENT_DIR}/util") 9 | 10 | message(STATUS "Building ${hfiles} ${files}") 11 | add_library(logdevice_python_util SHARED ${hfiles} ${files}) 12 | 13 | include_directories(${PYTHON_INCLUDE_DIRS}) 14 | 15 | add_dependencies(logdevice_python_util folly) 16 | 17 | target_link_libraries(logdevice_python_util 18 | ${FOLLY_LIBRARIES} 19 | ${Boost_LIBRARIES} 20 | ${PYTHON_LIBRARIES} 21 | ) 22 | 23 | install(TARGETS logdevice_python_util 24 | COMPONENT runtime 25 | DESTINATION lib 26 | ) 27 | -------------------------------------------------------------------------------- /logdevice/common/ClientBridge.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | class TraceLogger; 15 | 16 | /** 17 | * Interface for AppendRequest and TrimRequest to call back into ClientImpl. 18 | * Works around a dependency issue (AppendRequest is in common/ but ClientImpl 19 | * in lib/); more in t8775222. 20 | */ 21 | class ClientBridge { 22 | public: 23 | virtual const std::shared_ptr getTraceLogger() const = 0; 24 | virtual bool hasWriteToken(const std::string& required) const = 0; 25 | virtual ~ClientBridge() {} 26 | }; 27 | 28 | }} // namespace facebook::logdevice 29 | -------------------------------------------------------------------------------- /logdevice/common/ConnectionKind.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | namespace facebook { namespace logdevice { 11 | /** 12 | * @file ConnectionKind enum represents the kind of connection is 13 | * defined by the server-side port, so all connection coming to 14 | * the same port are of the same kind and it is different from kinds 15 | * of other ports. 16 | */ 17 | 18 | enum class ConnectionKind : uint8_t { 19 | DATA, 20 | DATA_LOW_PRIORITY, 21 | DATA_HIGH_PRIORITY, 22 | DATA_SSL, 23 | GOSSIP, 24 | SERVER_TO_SERVER, 25 | MAX, 26 | }; 27 | 28 | }} // namespace facebook::logdevice 29 | -------------------------------------------------------------------------------- /logdevice/common/CopySetSelectorDependencies.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/CopySetSelectorDependencies.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | const NodeAvailabilityChecker* 13 | CopySetSelectorDependencies::getNodeAvailability() const { 14 | return NodeAvailabilityChecker::instance(); 15 | } 16 | 17 | const CopySetSelectorDependencies* CopySetSelectorDependencies::instance() { 18 | static CopySetSelectorDependencies d; 19 | return &d; 20 | } 21 | 22 | }} // namespace facebook::logdevice 23 | -------------------------------------------------------------------------------- /logdevice/common/DistributedRequest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/DistributedRequest.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | DistributedRequest::~DistributedRequest() {} 13 | 14 | FailedShardsMap DistributedRequest::getFailedShards(Status status) const { 15 | if (status == Status::OK || !nodeset_accessor_) { 16 | return FailedShardsMap{}; 17 | } 18 | 19 | return nodeset_accessor_->getFailedShards( 20 | [](Status s) -> bool { return s != Status::OK; }); 21 | } 22 | 23 | }} // namespace facebook::logdevice 24 | -------------------------------------------------------------------------------- /logdevice/common/Envelope.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/Envelope.h" 9 | 10 | #include "logdevice/common/Connection.h" 11 | #include "logdevice/common/FlowGroup.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | void Envelope::operator()(FlowGroup& fg, std::mutex& flow_meters_mutex) { 16 | std::unique_lock lock(flow_meters_mutex); 17 | if (!fg.drain(*this)) { 18 | // Should never happen. 19 | ld_check(false); 20 | fg.push(*this, priority()); 21 | return; 22 | } 23 | conn().releaseMessage(*this); 24 | } 25 | 26 | }} // namespace facebook::logdevice 27 | -------------------------------------------------------------------------------- /logdevice/common/Err.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/include/Err.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | __thread E err; // see Err.h 13 | 14 | }} // namespace facebook::logdevice 15 | -------------------------------------------------------------------------------- /logdevice/common/LegacyLogToShard.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/types_internal.h" 11 | #include "logdevice/include/types.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | /** 16 | * @file Implements the legacy mapping from log_ids to shards. Newer code 17 | * should use the ShardID's in the storage set 18 | */ 19 | 20 | inline int getLegacyShardIndexForLog(logid_t log_id, shard_size_t num_shards) { 21 | return log_id.val_ % num_shards; 22 | } 23 | }} // namespace facebook::logdevice 24 | -------------------------------------------------------------------------------- /logdevice/common/NodeHealthStatus.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/NodeHealthStatus.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | std::string toString(NodeHealthStatus status) { 13 | switch (status) { 14 | case NodeHealthStatus::HEALTHY: 15 | return "HEALTHY"; 16 | case NodeHealthStatus::OVERLOADED: 17 | return "OVERLOADED"; 18 | case NodeHealthStatus::UNHEALTHY: 19 | return "UNHEALTHY"; 20 | case NodeHealthStatus::UNDEFINED: 21 | return "UNDEFINED"; 22 | } 23 | return "UNKNOWN"; 24 | } 25 | 26 | }} // namespace facebook::logdevice 27 | -------------------------------------------------------------------------------- /logdevice/common/NodeHealthStatus.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | /** 16 | * @file Specify health status of a node. Determined by various factors and 17 | * detected on server side. 18 | */ 19 | enum NodeHealthStatus { 20 | // Used when health status detecting is disabled, node is dead or for 21 | // backwards compatibility. 22 | UNDEFINED, 23 | HEALTHY, 24 | OVERLOADED, 25 | UNHEALTHY 26 | }; 27 | std::string toString(NodeHealthStatus status); 28 | }} // namespace facebook::logdevice 29 | -------------------------------------------------------------------------------- /logdevice/common/NodesConfigurationUpdatedRequest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/NodesConfigurationUpdatedRequest.h" 9 | 10 | #include "logdevice/common/Worker.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | Request::Execution NodesConfigurationUpdatedRequest::execute() { 15 | Worker* worker = Worker::onThisThread(); 16 | worker->onNodesConfigurationUpdated(); 17 | return Execution::COMPLETE; 18 | } 19 | 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/common/NwShapingFlowGroupDeps.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2004-present Facebook. All Rights Reserved. 2 | 3 | #include "logdevice/common/FlowGroupDependencies.h" 4 | #include "logdevice/common/Sender.h" 5 | #include "logdevice/common/Worker.h" 6 | 7 | namespace facebook { namespace logdevice { 8 | 9 | NwShapingFlowGroupDeps::NwShapingFlowGroupDeps(StatsHolder* stats, 10 | Sender* sender) 11 | : stats_(stats), sender_(sender) {} 12 | 13 | bool NwShapingFlowGroupDeps::onCorrectInstance() { 14 | // sender_ is null in unit tests. 15 | return (sender_ == nullptr || &Worker::onThisThread()->sender() == sender_); 16 | } 17 | }} // namespace facebook::logdevice 18 | -------------------------------------------------------------------------------- /logdevice/common/Random.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/Random.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | DefaultRNG& DefaultRNG::get() { 13 | static DefaultRNG r; 14 | return r; 15 | } 16 | 17 | }} // namespace facebook::logdevice 18 | -------------------------------------------------------------------------------- /logdevice/common/RateLimiter.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/RateLimiter.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | template class RateLimiterBase; 13 | 14 | }} // namespace facebook::logdevice 15 | -------------------------------------------------------------------------------- /logdevice/common/ReaderProgressRequest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/ReaderProgressRequest.h" 9 | 10 | #include "logdevice/common/DataRecordOwnsPayload.h" 11 | #include "logdevice/common/Worker.h" 12 | #include "logdevice/common/client_read_stream/AllClientReadStreams.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | Request::Execution ReaderProgressRequest::execute() { 17 | Worker* w = Worker::onThisThread(); 18 | w->clientReadStreams().onReaderProgress(handle_.read_stream_id); 19 | return Execution::COMPLETE; 20 | } 21 | 22 | }} // namespace facebook::logdevice 23 | -------------------------------------------------------------------------------- /logdevice/common/RetryHandler.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include "logdevice/common/RetryHandler.h" 10 | -------------------------------------------------------------------------------- /logdevice/common/ServerConfigUpdatedRequest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/ServerConfigUpdatedRequest.h" 9 | 10 | #include "logdevice/common/Worker.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | Request::Execution ServerConfigUpdatedRequest::execute() { 15 | Worker* worker = Worker::onThisThread(); 16 | worker->onServerConfigUpdated(); 17 | 18 | return Execution::COMPLETE; 19 | } 20 | 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/common/SnapshotStoreTypes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | namespace facebook { namespace logdevice { 11 | enum class SnapshotStoreType : uint8_t { 12 | LEGACY = 0, 13 | LOG, 14 | MESSAGE, 15 | LOCAL_STORE 16 | }; 17 | }} // namespace facebook::logdevice 18 | -------------------------------------------------------------------------------- /logdevice/common/StartReadingRequest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/StartReadingRequest.h" 9 | 10 | #include "logdevice/common/DataRecordOwnsPayload.h" 11 | #include "logdevice/common/Worker.h" 12 | #include "logdevice/common/client_read_stream/AllClientReadStreams.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | Request::Execution StartReadingRequest::execute() { 17 | Worker* w = Worker::onThisThread(); 18 | w->clientReadStreams().insertAndStart(std::move(read_stream_)); 19 | return Execution::COMPLETE; 20 | } 21 | 22 | }} // namespace facebook::logdevice 23 | -------------------------------------------------------------------------------- /logdevice/common/TimerInterface.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | class TimerInterface { 16 | public: 17 | virtual void activate(std::chrono::microseconds delay) = 0; 18 | virtual void cancel() = 0; 19 | virtual bool isActive() const = 0; 20 | virtual void setCallback(std::function callback) = 0; 21 | virtual void assign(std::function callback) = 0; 22 | virtual bool isAssigned() const = 0; 23 | virtual ~TimerInterface() = default; 24 | }; 25 | 26 | }} // namespace facebook::logdevice 27 | -------------------------------------------------------------------------------- /logdevice/common/ZookeeperClientFactoryProd.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/ZookeeperClientBase.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | /** 15 | * Production Zookeper factory used to create ZookeeperClient instances, 16 | * which connect to Zookeeper servers. 17 | */ 18 | std::unique_ptr 19 | zkFactoryProd(const configuration::ZookeeperConfig& config); 20 | 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/common/config.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | /** 13 | * @file LogDevice compile-time options. In the future, this file could be 14 | * generated by autotools or the like based on what's available on the system. 15 | */ 16 | 17 | // Use jemalloc as the memory allocator. On by default, but disabled if 18 | // any of the sanitizer tools (ASAN, TSAN, UBSAN) are used, since they 19 | // use a custom allocator. 20 | #define LOGDEVICE_USING_JEMALLOC 21 | 22 | #if defined(FOLLY_SANITIZE_ADDRESS) || defined(FOLLY_SANITIZE_THREAD) 23 | #undef LOGDEVICE_USING_JEMALLOC 24 | #endif 25 | -------------------------------------------------------------------------------- /logdevice/common/configuration/ConfigUpdater.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | namespace facebook { namespace logdevice { namespace configuration { 11 | 12 | class ConfigUpdater { 13 | public: 14 | virtual void invalidateConfig() = 0; 15 | virtual int fetchFromSource() = 0; 16 | virtual ~ConfigUpdater() = default; 17 | }; 18 | }}} // namespace facebook::logdevice::configuration 19 | -------------------------------------------------------------------------------- /logdevice/common/configuration/TrafficShapingConfig.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/configuration/ShapingConfig.h" 13 | 14 | namespace facebook { namespace logdevice { namespace configuration { 15 | 16 | struct TrafficShapingConfig : public ShapingConfig { 17 | TrafficShapingConfig(); 18 | 19 | folly::dynamic toFollyDynamic() const; 20 | 21 | TrafficClass default_read_traffic_class = TrafficClass::READ_BACKLOG; 22 | }; 23 | 24 | }}} // namespace facebook::logdevice::configuration 25 | -------------------------------------------------------------------------------- /logdevice/common/configuration/logs/CodecType.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/include/types.h" 11 | 12 | namespace facebook { namespace logdevice { namespace logsconfig { 13 | 14 | enum class CodecType : uint8_t { FLATBUFFERS = 0 }; 15 | }}} // namespace facebook::logdevice::logsconfig 16 | -------------------------------------------------------------------------------- /logdevice/common/configuration/logs/delta_types.inc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | /* can be included multiple times */ 9 | 10 | #ifndef DELTA_TYPE 11 | #error DELTA_TYPE() macro not defined 12 | #define DELTA_TYPE(...) 13 | #endif 14 | 15 | DELTA_TYPE(INVALID) 16 | DELTA_TYPE(MK_DIRECTORY) 17 | DELTA_TYPE(MK_LOG_GROUP) 18 | DELTA_TYPE(REMOVE) 19 | DELTA_TYPE(RENAME) 20 | DELTA_TYPE(SET_ATTRS) 21 | DELTA_TYPE(SET_LOG_RANGE) 22 | DELTA_TYPE(BATCH) 23 | DELTA_TYPE(SET_TREE) 24 | 25 | #undef DELTA_TYPE 26 | -------------------------------------------------------------------------------- /logdevice/common/configuration/nodes/FileBasedNodesConfigurationStore.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/FileBasedVersionedConfigStore.h" 11 | #include "logdevice/common/configuration/nodes/NodesConfigurationStore.h" 12 | 13 | namespace facebook { namespace logdevice { namespace configuration { 14 | namespace nodes { 15 | 16 | using FileBasedNodesConfigurationStore = 17 | VersionedNodesConfigurationStore; 18 | 19 | }}}} // namespace facebook::logdevice::configuration::nodes 20 | -------------------------------------------------------------------------------- /logdevice/common/configuration/nodes/SequencerConfig.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/configuration/nodes/SequencerConfig.h" 9 | 10 | #include "logdevice/common/debug.h" 11 | #include "logdevice/common/types_internal.h" 12 | 13 | namespace facebook { namespace logdevice { namespace configuration { 14 | namespace nodes { 15 | 16 | template <> 17 | bool SequencerAttributeConfig::attributeSpecificValidate() const { 18 | return true; 19 | } 20 | 21 | template <> 22 | bool SequencerConfig::roleSpecificValidate() const { 23 | return true; 24 | } 25 | 26 | }}}} // namespace facebook::logdevice::configuration::nodes 27 | -------------------------------------------------------------------------------- /logdevice/common/configuration/nodes/ZookeeperNodesConfigurationStore.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/ZookeeperVersionedConfigStore.h" 11 | #include "logdevice/common/configuration/nodes/NodesConfigurationStore.h" 12 | 13 | namespace facebook { namespace logdevice { namespace configuration { 14 | namespace nodes { 15 | 16 | using ZookeeperNodesConfigurationStore = 17 | VersionedNodesConfigurationStore; 18 | }}}} // namespace facebook::logdevice::configuration::nodes 19 | -------------------------------------------------------------------------------- /logdevice/common/configuration/utils/ConfigurationCodec.thrift: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | namespace cpp2 facebook.logdevice.configuration.thrift 10 | 11 | typedef byte (cpp2.type = "std::uint8_t") u8 12 | typedef i16 (cpp2.type = "std::uint16_t") u16 13 | typedef i32 (cpp2.type = "std::uint32_t") u32 14 | typedef i64 (cpp2.type = "std::uint64_t") u64 15 | 16 | struct ConfigurationCodecHeader { 17 | 1: u32 proto_version; 18 | 2: u64 config_version; 19 | 3: bool is_compressed; 20 | } 21 | 22 | struct ConfigurationCodecWrapper { 23 | 1: ConfigurationCodecHeader header; 24 | 2: binary serialized_config; 25 | } 26 | -------------------------------------------------------------------------------- /logdevice/common/data_classes.inc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | /* can be included multiple times */ 9 | 10 | #ifndef DATA_CLASS 11 | #error DATA_CLASS() macro not defined 12 | #define DATA_CLASS(...) 13 | #endif 14 | 15 | DATA_CLASS(APPEND, 'A') // Adding new records. 16 | DATA_CLASS(REBUILD, 'R') // Reading or writing a record to restore its 17 | // replication factor. 18 | 19 | #undef DATA_CLASS 20 | -------------------------------------------------------------------------------- /logdevice/common/if/for_open_source/common/fb303/if/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | include_directories(${CMAKE_BINARY_DIR}}) 8 | 9 | set(_fb303_if_include_prefix "common/fb303/if") 10 | 11 | file(MAKE_DIRECTORY ${CMAKE_BINARY_DIR}/${_fb303_if_include_prefix}) 12 | 13 | ld_thrift_py3_library( 14 | "fb303" 15 | "FacebookService" 16 | "" 17 | "${CMAKE_CURRENT_SOURCE_DIR}" 18 | "${CMAKE_BINARY_DIR}/${_fb303_if_include_prefix}" 19 | "${_fb303_if_include_prefix}" 20 | ) 21 | 22 | add_dependencies(fb303-cpp2-target fbthrift) 23 | -------------------------------------------------------------------------------- /logdevice/common/libevent/EvTimerWithFolly.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2004-present Facebook. All Rights Reserved. 2 | 3 | #include "logdevice/common/libevent/EvTimerWithFolly.h" 4 | 5 | #include 6 | 7 | namespace facebook { namespace logdevice { 8 | int EvTimerWithFolly::setPriority(int pri) { 9 | return event_priority_set(getEvent()->getEvent(), pri); 10 | } 11 | void EvTimerWithFolly::activate(int res, short ncalls) { 12 | event_active(getEvent()->getEvent(), res, ncalls); 13 | } 14 | }} // namespace facebook::logdevice 15 | -------------------------------------------------------------------------------- /logdevice/common/libevent/IEvBase.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include "logdevice/common/libevent/IEvBase.h" 10 | 11 | namespace facebook { namespace logdevice { 12 | thread_local IEvBase* IEvBase::running_base_ = nullptr; 13 | 14 | }} // namespace facebook::logdevice 15 | -------------------------------------------------------------------------------- /logdevice/common/network/NetworkWorkContext.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/network/NetworkWorkContext.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | NetworkWorkContext::NetworkWorkContext(EventLoop& eventLoop, 13 | work_context_id_t id) 14 | : WorkContext(getKeepAliveToken(&eventLoop), id), eventLoop_(eventLoop) {} 15 | 16 | EventLoop& NetworkWorkContext::getEventLoop() { 17 | return eventLoop_; 18 | } 19 | 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/common/network/test/ConnectionFactoryTest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/network/ConnectionFactory.h" 9 | 10 | #include 11 | #include 12 | 13 | #include "logdevice/common/test/MockSettings.h" 14 | 15 | namespace facebook { namespace logdevice { 16 | 17 | using namespace testing; 18 | 19 | TEST(ConnectionFactoryTest, Create) { 20 | MockSettings settings; 21 | ConnectionFactory factory(settings); 22 | } 23 | 24 | }} // namespace facebook::logdevice 25 | -------------------------------------------------------------------------------- /logdevice/common/nodeset_selection/NodeSetSelectorFactory.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include "logdevice/common/nodeset_selection/NodeSetSelector.h" 14 | #include "logdevice/common/nodeset_selection/NodeSetSelectorType.h" 15 | 16 | namespace facebook { namespace logdevice { 17 | 18 | /** 19 | * @file create a NodeSetSelector of the given type 20 | */ 21 | 22 | class NodeSetSelectorFactory { 23 | public: 24 | static std::unique_ptr create(NodeSetSelectorType type); 25 | }; 26 | 27 | }} // namespace facebook::logdevice 28 | -------------------------------------------------------------------------------- /logdevice/common/plugin/Logger.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/plugin/Plugin.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | class Logger : public Plugin { 17 | public: 18 | PluginType type() const override { 19 | return PluginType::LOGGER; 20 | } 21 | 22 | virtual void log(const char* cluster_name, 23 | int level, 24 | const folly::StringPiece line) const {} 25 | }; 26 | 27 | }} // namespace facebook::logdevice 28 | -------------------------------------------------------------------------------- /logdevice/common/plugin/test/DummyLoggerPlugin.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include "logdevice/common/plugin/test/DummyLoggerPlugin.h" 10 | 11 | // Empty c++ file to force generate the shared library 12 | -------------------------------------------------------------------------------- /logdevice/common/protocol/CHECK_NODE_HEALTH_Message.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/protocol/CHECK_NODE_HEALTH_Message.h" 9 | 10 | #include 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | template <> 15 | Message::Disposition CHECK_NODE_HEALTH_Message::onReceived(const Address&) { 16 | // Receipt handler lives in server/CHECK_NODE_HEALTH_onReceived.cpp; this 17 | // should never get called. 18 | std::abort(); 19 | } 20 | 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/common/protocol/DELETE_LOG_METADATA_Message.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/protocol/DELETE_LOG_METADATA_Message.h" 9 | 10 | namespace facebook { namespace logdevice { 11 | 12 | template <> 13 | Message::Disposition DELETE_LOG_METADATA_Message::onReceived(const Address&) { 14 | // Receipt handler lives in server/DELETE_LOG_METADATA_onReceived.cpp; this 15 | // should never get called. 16 | std::abort(); 17 | } 18 | 19 | }} // namespace facebook::logdevice 20 | -------------------------------------------------------------------------------- /logdevice/common/protocol/MEMTABLE_FLUSHED_Message.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/common/protocol/MEMTABLE_FLUSHED_Message.h" 9 | 10 | #include 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | template <> 15 | Message::Disposition MEMTABLE_FLUSHED_Message::onReceived(const Address&) { 16 | // Receipt handler lives in server/MEMTABLE_FLUSHED_onReceived.cpp; this 17 | // should never get called. 18 | std::abort(); 19 | } 20 | 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/common/protocol/MessageTypeNames.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/MessageType.h" 11 | #include "logdevice/include/EnumMap.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | /** 16 | * @file a specialization of EnumMap for mapping MessageTypes and 17 | * their int representations to human-readable names. Also can be used 18 | * to check if a given int represents a valid MessageType. 19 | */ 20 | 21 | const EnumMap& messageTypeNames(); 22 | 23 | }} // namespace facebook::logdevice 24 | -------------------------------------------------------------------------------- /logdevice/common/protocol/NODE_STATS_REPLY_Message.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include "logdevice/common/protocol/NODE_STATS_REPLY_Message.h" 10 | 11 | namespace facebook { namespace logdevice { 12 | 13 | template <> 14 | Message::Disposition 15 | NODE_STATS_REPLY_Message::onReceived(const Address& /*from*/) { 16 | // this function should not be called. Instead it lives in 17 | // lib/NODE_STATS_REPLY_onReceived.cpp 18 | std::abort(); 19 | } 20 | 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/common/protocol/NODE_STATS_REPLY_Message.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/SimpleMessage.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | struct NODE_STATS_REPLY_Header { 14 | uint64_t msg_id; 15 | } __attribute__((__packed__)); 16 | 17 | using NODE_STATS_REPLY_Message = SimpleMessage; 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/common/replicated_state_machine/RsmVersionTypes.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #pragma once 10 | 11 | namespace facebook { namespace logdevice { 12 | enum class RsmVersionType { IN_MEMORY, DURABLE }; 13 | }} // namespace facebook::logdevice 14 | -------------------------------------------------------------------------------- /logdevice/common/replicated_state_machine/rsm_types.inc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | /* can be included multiple times */ 9 | 10 | #ifndef RSM_TYPE 11 | #error RSM_TYPE() macro not defined 12 | #define RSM_TYPE(...) 13 | #endif 14 | 15 | // Args: enum_name, string_name 16 | 17 | RSM_TYPE(KEY_VALUE_STORE_STATE_MACHINE, "keyvaluestore") 18 | RSM_TYPE(EVENT_LOG_STATE_MACHINE, "eventlog") 19 | RSM_TYPE(LOGS_CONFIG_STATE_MACHINE, "logsconfig") 20 | RSM_TYPE(MAINTENANCE_LOG_STATE_MACHINE, "maintenancelog") 21 | 22 | #undef RSM_TYPE 23 | -------------------------------------------------------------------------------- /logdevice/common/settings/SSLSettingValidation.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/settings/Settings.h" 11 | 12 | /** 13 | * @file Method for validating existence of SSL certs specified by settings 14 | */ 15 | 16 | namespace facebook { namespace logdevice { 17 | 18 | // Validates that SSL certs specified in the settings exist and that files 19 | // are readable. If `ca_only` is `true`, then only verifies the CA cert 20 | bool validateSSLCertificatesExist(std::shared_ptr settings, 21 | bool ca_only = false); 22 | 23 | }} // namespace facebook::logdevice 24 | -------------------------------------------------------------------------------- /logdevice/common/settings/util.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/settings/UpdateableSettings.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | /** 15 | * Create a SettingsBundle with default values. SettingBundles should not be 16 | * instantiated manually as bundles need to go through UpdateableSettings to be 17 | * initialized with default values. 18 | */ 19 | 20 | template 21 | T create_default_settings() { 22 | UpdateableSettings s; 23 | return *s.get(); 24 | } 25 | 26 | }} // namespace facebook::logdevice 27 | -------------------------------------------------------------------------------- /logdevice/common/stats/per_request_type_stats.inc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | /* can be included multiple times */ 9 | 10 | #ifndef STAT_DEFINE 11 | #error STAT_DEFINE() macro not defined 12 | #define STAT_DEFINE(...) 13 | #endif 14 | 15 | // Number of requests posted 16 | STAT_DEFINE(post_request, SUM) 17 | // Number of microseconds that workers spent processing requests of this type. 18 | STAT_DEFINE(request_worker_usec, SUM) 19 | 20 | #undef STAT_DEFINE 21 | #undef RESETTING_STATS 22 | -------------------------------------------------------------------------------- /logdevice/common/storage_task_priorities.inc: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | /* can be included multiple times */ 9 | 10 | #ifndef STORAGE_TASK_PRIORITY 11 | #error STORAGE_TASK_PRIORITY() macro not defined 12 | #define STORAGE_TASK_PRIORITY(...) 13 | #endif 14 | 15 | STORAGE_TASK_PRIORITY(LOW, "low") 16 | STORAGE_TASK_PRIORITY(MID, "mid") 17 | STORAGE_TASK_PRIORITY(HIGH, "high") 18 | STORAGE_TASK_PRIORITY(VERY_HIGH, "very-high") 19 | 20 | #undef STORAGE_TASK_PRIORITY 21 | -------------------------------------------------------------------------------- /logdevice/common/test/InMemNodesConfigurationStore.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/configuration/nodes/NodesConfigurationStore.h" 11 | #include "logdevice/common/test/InMemVersionedConfigStore.h" 12 | 13 | namespace facebook { namespace logdevice { namespace configuration { 14 | namespace nodes { 15 | 16 | using InMemNodesConfigurationStore = 17 | VersionedNodesConfigurationStore; 18 | 19 | }}}} // namespace facebook::logdevice::configuration::nodes 20 | -------------------------------------------------------------------------------- /logdevice/common/test/MockNodeServiceDiscovery.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/configuration/nodes/ServiceDiscoveryConfig.h" 13 | 14 | namespace facebook { namespace logdevice { namespace configuration { 15 | namespace nodes { 16 | 17 | struct MockNodeServiceDiscovery : public NodeServiceDiscovery {}; 18 | 19 | }}}} // namespace facebook::logdevice::configuration::nodes 20 | -------------------------------------------------------------------------------- /logdevice/common/test/MockNodesConfiguration.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/configuration/nodes/NodesConfiguration.h" 13 | 14 | namespace facebook { namespace logdevice { namespace configuration { 15 | namespace nodes { 16 | 17 | struct MockNodesConfiguration : public NodesConfiguration { 18 | MOCK_METHOD1(getNodeID, NodeID(node_index_t)); 19 | MOCK_CONST_METHOD1(getNodeServiceDiscovery, 20 | const NodeServiceDiscovery*(node_index_t)); 21 | }; 22 | }}}} // namespace facebook::logdevice::configuration::nodes 23 | -------------------------------------------------------------------------------- /logdevice/common/test/MockSettings.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/settings/Settings.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | struct MockSettings : public Settings {}; 17 | 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/common/test/MockShapingConfig.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/configuration/ShapingConfig.h" 13 | 14 | namespace facebook { namespace logdevice { namespace configuration { 15 | 16 | class MockShapingConfig : public configuration::ShapingConfig { 17 | public: 18 | MOCK_CONST_METHOD0(toFollyDynamic, folly::dynamic()); 19 | MOCK_CONST_METHOD1(configured, bool(NodeLocationScope)); 20 | }; 21 | 22 | }}} // namespace facebook::logdevice::configuration 23 | -------------------------------------------------------------------------------- /logdevice/common/test/benchmarks/BenchmarkMain.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | 13 | int main(int argc, char** argv) { 14 | folly::SingletonVault::singleton()->registrationComplete(); 15 | gflags::ParseCommandLineFlags(&argc, &argv, true); 16 | folly::runBenchmarks(); 17 | 18 | return 0; 19 | } 20 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/bad_id.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "bad_id", 3 | "logs": [ 4 | { 5 | "id": "1..100 o hai can i sit here", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/dup_metanodes.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "dup_metanodes", 3 | "logs": [ 4 | { 5 | "id": 1, 6 | "replication_factor": 2, 7 | "synced_copies": 0, 8 | "max_writes_in_flight": 10001 9 | } 10 | ], 11 | "metadata_logs": { 12 | "nodeset": [1, 2, 2], 13 | "replication_factor": 1 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/dup_server_name.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "duphost", 3 | "logs": [ 4 | { 5 | "id": 1, 6 | "replication_factor": 2, 7 | "synced_copies": 0, 8 | "max_writes_in_flight": 10001 9 | } 10 | ], 11 | "metadata_logs": { 12 | "nodeset": "0", 13 | "replication_factor": 1 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/duphost.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "duphost", 3 | "logs": [ 4 | { 5 | "id": 1, 6 | "replication_factor": 2, 7 | "synced_copies": 0, 8 | "max_writes_in_flight": 10001 9 | } 10 | ], 11 | "metadata_logs": { 12 | "nodeset": "0", 13 | "replication_factor": 1 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/dupid.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "dupid-test", 3 | "logs": [ 4 | { 5 | "name": "foo", 6 | "id": "1..10", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 7 | } 8 | ], 9 | "metadata_logs": { 10 | "nodeset": "9", 11 | "replication_factor": 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/dupname.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "dupname-test", 3 | "logs": [ 4 | { 5 | "name": "foo", 6 | "id": "1..10", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 7 | }, 8 | { 9 | "id": "11..200", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 10 | }, 11 | { 12 | "name": "foo", 13 | "id": "300..400", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 14 | } 15 | ], 16 | "metadata_logs": { 17 | "nodeset": "0", 18 | "replication_factor": 1 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/internal_logs_correct.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "defaults", 3 | "defaults": { 4 | "replication_factor": 2, 5 | "nodeset_size": 3, 6 | "synced_copies": 0, 7 | "max_writes_in_flight": 1000, 8 | "sync_replicate_across": "RACK", 9 | "backlog": "4d", 10 | "delivery_latency": "10ms", 11 | "scd_enabled": true, 12 | }, 13 | "internal_logs": { 14 | "event_log_deltas": { 15 | "replication_factor": 2, 16 | "nodeset_size": 3, 17 | "synced_copies": 0, 18 | "max_writes_in_flight": 1000, 19 | "sync_replicate_across": "RACK", 20 | "scd_enabled": false, 21 | } 22 | }, 23 | "logs": [ 24 | { 25 | "name": "foo1", 26 | "id": 1, 27 | "backlog": null, 28 | } 29 | ], 30 | "metadata_logs": { 31 | "nodeset": [0, 1, 2], 32 | "replication_factor": 2 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_generation_with_non_storage_role.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_empty", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_properties_sequencer1.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_unknown", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000, 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_properties_sequencer2.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_unknown", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_properties_sequencer3.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_unknown", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_roles_empty.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_empty", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_roles_not_array.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_unknown", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_roles_unknown.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_roles_unknown", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/invalid_sequencer_affinity.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "invalid_sequencer_affinity", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000, 10 | "sequencer_affinity": "rgn1" 11 | } 12 | ], 13 | "metadata_logs": { 14 | "nodeset": [0, 1], 15 | "replication_factor": 2 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/kobold/components/logdevice.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/logdevice/common/test/configs/kobold/components/logdevice.py -------------------------------------------------------------------------------- /logdevice/common/test/configs/logsconfig_manager_without_logs.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster" : "logsconfig_manager", 3 | "server_settings": { 4 | "enable-logsconfig-manager": "true" 5 | }, 6 | "client_settings": { 7 | "enable-logsconfig-manager": "true", 8 | }, 9 | "internal_logs": { 10 | "config_log_deltas": { 11 | "replication_factor": 2, 12 | "synced_copies": 0, 13 | "max_writes_in_flight": 1000, 14 | "sync_replicate_across": "NODE", 15 | "scd_enabled": false, 16 | }, 17 | "config_log_snapshots": { 18 | "replication_factor": 2, 19 | "synced_copies": 0, 20 | "max_writes_in_flight": 1000, 21 | "sync_replicate_across": "NODE", 22 | "scd_enabled": false, 23 | } 24 | }, 25 | "metadata_logs" : { 26 | "nodeset" : [ 27 | 1 28 | ], 29 | "replication_factor" : 1 30 | }, 31 | } 32 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/negative_replication.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "two_sequencers", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": -1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 256 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": "0", 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/nodeset_test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "nodeset_test", 3 | "logs": [ 4 | { 5 | "name": "mylogs", 6 | "id": "1..100", 7 | "replication_factor": 2, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 256, 10 | "nodeset_size": 3 11 | } 12 | ], 13 | "metadata_logs": { 14 | "nodeset": "1..5", 15 | "replication_factor": 3 16 | } 17 | } 18 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/noid.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "noid-test", 3 | "logs": [ 4 | { 5 | "name": "foo", 6 | "id": "1..10", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 7 | } 8 | ], 9 | "metadata_logs": { 10 | "nodeset": [0], 11 | "replication_factor": 1 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/overlap1.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "overlap1", 3 | "server_settings": { 4 | "enable-logsconfig-manager": "false" 5 | }, 6 | "client_settings": { 7 | "enable-logsconfig-manager": "false" 8 | }, 9 | "logs": [ 10 | { 11 | "id": "1..10", "name": "lg1", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 12 | }, 13 | { 14 | "id": "11..100", "name": "lg2", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 15 | }, 16 | { 17 | "id": "100..200", "name": "lg3", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 18 | } 19 | ], 20 | 21 | "metadata_logs": { 22 | "nodeset": "0", 23 | "replication_factor": 1 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/overlap2.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "overlap2", 3 | "logs": [ 4 | { 5 | "id": 100, "name": "lg1", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 6 | }, 7 | { 8 | "id": 100, "name": "lg2", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 9 | } 10 | ], 11 | "metadata_logs": { 12 | "nodeset": "0", 13 | "replication_factor": 1 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/overlap3.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "overlap3", 3 | "logs": [ 4 | { 5 | "id": "11..100", "name": "lg1", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 6 | }, 7 | { 8 | "id": "5..20", "name": "lg2", "replication_factor": 1, "synced_copies": 0, "max_writes_in_flight": 256 9 | } 10 | ], 11 | "metadata_logs": { 12 | "nodeset": "0", 13 | "replication_factor": 1 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/partial_ssl_nodes.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "sample_valid", 3 | "logs": [ 4 | { 5 | "id": 1, 6 | "replication_factor": 1, 7 | "synced_copies": 0, 8 | "max_writes_in_flight": 10001 9 | }, 10 | { 11 | "id": 2, 12 | "replication_factor": 2, 13 | "synced_copies": 1, 14 | "max_writes_in_flight": 10, 15 | "single_writer": false 16 | }, 17 | { 18 | "id": "3", 19 | "replication_factor": 3, 20 | "synced_copies": 3, 21 | "max_writes_in_flight": 10, 22 | "single_writer": true 23 | }, 24 | { 25 | "name": "foo", 26 | "id": "8..10", 27 | "replication_factor": 3, 28 | "synced_copies": 1, 29 | "max_writes_in_flight": 10 30 | } 31 | ], 32 | "metadata_logs": { 33 | "nodeset": [0, 1, 2], 34 | "replication_factor": 2, 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/replication_too_big.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "two_sequencers", 3 | "logs": [ 4 | { 5 | "id": "1..100", 6 | "name": "bad", 7 | "replication_factor": 128, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 256 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/sequencer_affinity_2nodes.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "sequencer_affinity_2nodes", 3 | "logs": [ 4 | { 5 | "name": "log1", 6 | "id": "1", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000, 10 | "sequencer_affinity": "rgn1...." 11 | }, 12 | { 13 | "name": "log2", 14 | "id": "2", 15 | "replication_factor": 1, 16 | "synced_copies": 0, 17 | "max_writes_in_flight": 1000000, 18 | "sequencer_affinity": "rgn2...." 19 | }, 20 | { 21 | "name": "log3", 22 | "id": "3", 23 | "replication_factor": 1, 24 | "synced_copies": 0, 25 | "max_writes_in_flight": 1000000, 26 | "sequencer_affinity": "rgn3...." 27 | } 28 | ], 29 | "metadata_logs": { 30 | "nodeset": [0, 1], 31 | "replication_factor": 2 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/sequencer_affinity_7nodes.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "sequencer_affinity_7nodes", 3 | "logs": [ 4 | { 5 | "name": "log1", 6 | "id": "1", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000, 10 | "sequencer_affinity": "rgn1...." 11 | }, 12 | { 13 | "name": "log2", 14 | "id": "2", 15 | "replication_factor": 1, 16 | "synced_copies": 0, 17 | "max_writes_in_flight": 1000000, 18 | "sequencer_affinity": "rgn2...." 19 | }, 20 | { 21 | "name": "log3", 22 | "id": "3", 23 | "replication_factor": 1, 24 | "synced_copies": 0, 25 | "max_writes_in_flight": 1000000, 26 | "sequencer_affinity": "rgn3...." 27 | } 28 | ], 29 | "metadata_logs": { 30 | "nodeset": [0, 1], 31 | "replication_factor": 2 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/sequencer_test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "sequencer_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 100 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0, 1], 14 | "replication_factor": 2, 15 | "sequencers_provision_epoch_store": false, 16 | "sequencers_write_metadata_logs": false 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/sequencer_weights.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "sequencer_weights", 3 | "logs": [ 4 | { 5 | "name": "a", 6 | "id": 1, 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0, 1, 2], 14 | "replication_factor": 2, 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/ssl_double_fail.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "ssl_double_node_config", 3 | "logs": [ 4 | { 5 | "id": 1, 6 | "replication_factor": 1, 7 | "synced_copies": 0, 8 | "max_writes_in_flight": 10001 9 | } 10 | ], 11 | "metadata_logs": { 12 | "nodeset": [0], 13 | "replication_factor": 1, 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_fail2.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [1, 4], 14 | "replication_factor": 2 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_fail3.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [1, 4], 14 | "replication_factor": 2 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_fail4.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [1, 4], 14 | "replication_factor": 2 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_fail5.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [1, 4], 14 | "replication_factor": 2 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_fail6.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [1, 4], 14 | "replication_factor": 2 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_success1.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [1, 4], 14 | "replication_factor": 2 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/common/test/configs/storage_capacity_success2.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "storage_capacity_test", 3 | "logs": [ 4 | { 5 | "name": "log", 6 | "id": "1..100", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [13, 15], 14 | "replication_factor": 2 15 | } 16 | } 17 | 18 | -------------------------------------------------------------------------------- /logdevice/common/test/ssl_certs/ssl_ticket_seeds.json: -------------------------------------------------------------------------------- 1 | { 2 | "new": [ 3 | "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff", 4 | "111122223333444455556666777788889999aaaabbbbccccddddeeeeffff0000" 5 | ], 6 | "current": [ 7 | "0000111122223333444455556666777788889999aaaabbbbccccddddeeeeffff" 8 | ] 9 | } 10 | -------------------------------------------------------------------------------- /logdevice/common/version.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | // This should be updated when cutting a release branch. 11 | #define LOGDEVICE_VERSION "99.99.99" 12 | -------------------------------------------------------------------------------- /logdevice/debian/.gitignore: -------------------------------------------------------------------------------- 1 | .debhelper/ 2 | debhelper-build-stamp 3 | files 4 | logdevice.substvars 5 | logdevice/ 6 | -------------------------------------------------------------------------------- /logdevice/debian/changelog: -------------------------------------------------------------------------------- 1 | logdevice (0.1-1) UNRELEASED; urgency=medium 2 | 3 | * Initial skeleton for Debian packaing 4 | single package, excludes python bindings and unit tests. 5 | 6 | -- MAINTAINER Fri, 30 Nov 2018 12:06:45 +0000 7 | -------------------------------------------------------------------------------- /logdevice/debian/compat: -------------------------------------------------------------------------------- 1 | 10 2 | -------------------------------------------------------------------------------- /logdevice/debian/rules: -------------------------------------------------------------------------------- 1 | #!/usr/bin/make -f 2 | %: 3 | dh $@ --with python-virtualenv --use-system-packages --parallel 4 | 5 | override_dh_auto_configure: 6 | dh_auto_configure -- -DNO_PYTHON=TRUE 7 | 8 | # Run Cmake steps, need to do these manually, because dh_virtualenv overrides them 9 | logdevice_cmake: 10 | dh_auto_build 11 | dh_auto_install 12 | dh_link /opt/venvs/logdevice/bin/ldshell /usr/bin/ldshell 13 | dh_link /usr/lib/python3.6/dist-packages/logdevice /opt/venvs/logdevice/lib/python3.6/logdevice 14 | 15 | override_dh_virtualenv: logdevice_cmake 16 | dh_virtualenv --python python3 --sourcedirectory=ops --pip-tool=pip3 17 | 18 | override_dh_auto_test: 19 | # Unit tests surpressed, for time-being 20 | 21 | .PHONY: logdevice_cmake 22 | -------------------------------------------------------------------------------- /logdevice/debian/source/format: -------------------------------------------------------------------------------- 1 | 3.0 (native) 2 | -------------------------------------------------------------------------------- /logdevice/debian/triggers: -------------------------------------------------------------------------------- 1 | activate-noawait ldconfig 2 | -------------------------------------------------------------------------------- /logdevice/doc/client-api.md: -------------------------------------------------------------------------------- 1 | The LogDevice API enables your application to access LogDevice. 2 | -------------------------------------------------------------------------------- /logdevice/flake8_plugins: -------------------------------------------------------------------------------- 1 | ../scribe/flake8_plugins -------------------------------------------------------------------------------- /logdevice/footer.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 12 | 13 | 14 | 19 | 20 | 21 | 22 | -------------------------------------------------------------------------------- /logdevice/include/PermissionActions.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | namespace facebook { namespace logdevice { 11 | /** 12 | * The list of actions that a PermissionChecker can use to verify permissions. 13 | */ 14 | enum class ACTION { 15 | APPEND = 0, 16 | READ = 1, 17 | TRIM = 2, 18 | LOG_MANAGEMENT = 3, 19 | SERVER_INTERNAL = 4, // Message types allowed only between servers 20 | MAX // should always be last 21 | }; 22 | }} // namespace facebook::logdevice 23 | -------------------------------------------------------------------------------- /logdevice/lib/AsyncReader.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/include/AsyncReader.h" 9 | 10 | #include "logdevice/common/types_internal.h" 11 | #include "logdevice/include/Reader.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | lsn_t AsyncReader::nextFromLsnWhenStuck(lsn_t stuck_lsn, lsn_t tail_lsn) { 16 | return Reader::nextFromLsnWhenStuck(stuck_lsn, tail_lsn); 17 | } 18 | 19 | }} // namespace facebook::logdevice 20 | -------------------------------------------------------------------------------- /logdevice/lib/ClientPluginHelper.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/plugin/Plugin.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | PluginVector getClientPluginProviders(); 15 | 16 | }} // namespace facebook::logdevice 17 | -------------------------------------------------------------------------------- /logdevice/lib/NODE_STATS_REPLY_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/NODE_STATS_REPLY_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | Message::Disposition NODE_STATS_REPLY_onReceived(NODE_STATS_REPLY_Message* msg, 14 | const Address& from); 15 | }} // namespace facebook::logdevice 16 | -------------------------------------------------------------------------------- /logdevice/lib/NODE_STATS_onSent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/NODE_STATS_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | 14 | void NODE_STATS_onSent(const NODE_STATS_Message& msg, 15 | Status status, 16 | const Address& to); 17 | }} // namespace facebook::logdevice 18 | -------------------------------------------------------------------------------- /logdevice/lib/NodeStatsMessageCallback.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/include/Err.h" 11 | 12 | /** 13 | * @file NodeStatsMessageCallback is used in the messaging layer to communicate 14 | * with the NodeStatsHandler 15 | */ 16 | 17 | namespace facebook { namespace logdevice { 18 | 19 | class NodeStatsMessageCallback { 20 | public: 21 | virtual void onMessageSent(Status status) = 0; 22 | 23 | virtual void onReplyFromNode(uint64_t msg_id) = 0; 24 | 25 | virtual ~NodeStatsMessageCallback() = default; 26 | }; 27 | }} // namespace facebook::logdevice 28 | -------------------------------------------------------------------------------- /logdevice/lib/checkpointing/if/Checkpoint.thrift: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | namespace cpp2 facebook.logdevice.checkpointing.thrift 10 | 11 | typedef i64 (cpp2.type = "std::uint64_t") u64 12 | 13 | /** 14 | * A data structure representing a value stored in CheckpointStore map. 15 | */ 16 | struct Checkpoint { 17 | /** 18 | * The map where the key is log_id and the value is lsn. 19 | */ 20 | 1: map log_lsn_map; 21 | 2: u64 version; 22 | } 23 | -------------------------------------------------------------------------------- /logdevice/lib/ops/LocateSequencerRequest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include "logdevice/lib/ops/LocateSequencerRequest.h" 10 | 11 | namespace facebook { namespace logdevice { 12 | 13 | Request::Execution LocateSequencerRequest::execute() { 14 | Worker* w = Worker::onThisThread(); 15 | SequencerLocator& seqlocator = *(w->processor_->sequencer_locator_); 16 | 17 | seqlocator.locateSequencer(log_, *cb_); 18 | return Execution::COMPLETE; 19 | } 20 | 21 | WorkerType LocateSequencerRequest::getWorkerTypeAffinity() { 22 | return WorkerType::GENERAL; 23 | } 24 | 25 | }} // namespace facebook::logdevice 26 | -------------------------------------------------------------------------------- /logdevice/ops/.gitignore: -------------------------------------------------------------------------------- 1 | build 2 | dist 3 | -------------------------------------------------------------------------------- /logdevice/ops/README.md: -------------------------------------------------------------------------------- 1 | # LogDevice Ops 2 | This is the core operational library for logdevice. This package includes key 3 | abstractions required by the tooling to manage logdevice clusters. 4 | 5 | This code is python-3 only! 6 | 7 | P.S. This code is open-source only, if you are working on anything that cannot 8 | be open sourced, look somewhere else. 9 | -------------------------------------------------------------------------------- /logdevice/ops/admin_server/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | auto_sources(hfiles "*.h" RECURSE "${LOGDEVICE_ADMIN_SERVER_DIR}") 8 | auto_sources(files "*.cpp" RECURSE "${LOGDEVICE_ADMIN_SERVER_DIR}") 9 | 10 | add_executable(ld-admin-server ${files} ${hfiles}) 11 | target_link_libraries(ld-admin-server 12 | logdevice_server 13 | ${LOGDEVICE_EXTERNAL_DEPS} 14 | ) 15 | 16 | install(TARGETS ld-admin-server 17 | COMPONENT runtime 18 | DESTINATION bin 19 | ) 20 | -------------------------------------------------------------------------------- /logdevice/ops/ldops/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # pyre-strict 3 | 4 | # Copyright (c) Facebook, Inc. and its affiliates. 5 | # All rights reserved. 6 | # 7 | # This source code is licensed under the BSD-style license found in the 8 | # LICENSE file in the root directory of this source tree. 9 | -------------------------------------------------------------------------------- /logdevice/ops/ldops/const.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | 9 | ALL_SHARDS = -1 10 | INTERNAL_USER = "_internal_" 11 | 12 | DEFAULT_DATA_PORT = 4440 13 | DEFAULT_GOSSIP_PORT = 4441 14 | DEFAULT_SERVER_TO_SERVER_PORT = 4442 15 | DEFAULT_SSL_PORT = 4443 16 | DEFAULT_ADMIN_API_PORT = 6440 17 | # Client-facing Thrift API 18 | DEFAULT_CLIENT_THRIFT_PORT = 6441 19 | # Server-to-server Thrift API 20 | DEFAULT_SERVER_THRIFT_PORT = 6442 21 | DEFAULT_LOW_PRIO_DATA_PORT = 4446 22 | DEFAULT_MEDIUM_PRIO_DATA_PORT = 4447 23 | DEFAULT_HIGH_PRIO_DATA_PORT = 4448 24 | -------------------------------------------------------------------------------- /logdevice/ops/ldops/testutil/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/logdevice/ops/ldops/testutil/__init__.py -------------------------------------------------------------------------------- /logdevice/ops/ldops/testutil/async_test.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # pyre-strict 3 | 4 | # Copyright (c) Facebook, Inc. and its affiliates. 5 | # All rights reserved. 6 | # 7 | # This source code is licensed under the BSD-style license found in the 8 | # LICENSE file in the root directory of this source tree. 9 | 10 | import asyncio 11 | 12 | 13 | # pyre-ignore 14 | def async_test(f): 15 | # pyre-ignore 16 | def wrapper(*args, **kwargs): 17 | coro = asyncio.coroutine(f) 18 | future = coro(*args, **kwargs) 19 | loop = asyncio.get_event_loop() 20 | loop.run_until_complete(future) 21 | 22 | return wrapper 23 | -------------------------------------------------------------------------------- /logdevice/ops/ldops/types/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/logdevice/ops/ldops/types/__init__.py -------------------------------------------------------------------------------- /logdevice/ops/ldops/types/cluster.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # pyre-strict 3 | 4 | # Copyright (c) Facebook, Inc. and its affiliates. 5 | # All rights reserved. 6 | # 7 | # This source code is licensed under the BSD-style license found in the 8 | # LICENSE file in the root directory of this source tree. 9 | 10 | 11 | from dataclasses import dataclass 12 | from typing import Optional 13 | 14 | from ldops.types.socket_address import SocketAddress 15 | 16 | 17 | @dataclass(frozen=True) 18 | class Cluster: 19 | name: Optional[str] = None 20 | admin_server_addr: Optional[SocketAddress] = None 21 | 22 | def __post_init__(self) -> None: 23 | if not self.name and not self.admin_server_addr: 24 | raise ValueError("At least one of (name, admin_server_addr) required") 25 | -------------------------------------------------------------------------------- /logdevice/ops/ldops/types/tests/test_cluster.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | 9 | 10 | from unittest import TestCase 11 | 12 | from ldops.types.cluster import Cluster 13 | 14 | 15 | class TestCluster(TestCase): 16 | def test_init(self): 17 | with self.assertRaises(ValueError): 18 | Cluster() 19 | -------------------------------------------------------------------------------- /logdevice/ops/ldops/util/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | # pyre-strict 3 | 4 | # Copyright (c) Facebook, Inc. and its affiliates. 5 | # All rights reserved. 6 | # 7 | # This source code is licensed under the BSD-style license found in the 8 | # LICENSE file in the root directory of this source tree. 9 | 10 | # pragma: nocover 11 | -------------------------------------------------------------------------------- /logdevice/ops/ldquery/Errors.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | namespace facebook { namespace logdevice { namespace ldquery { 13 | 14 | struct LDQueryError : public std::exception { 15 | explicit LDQueryError(const std::string& message) : message(message) {} 16 | const char* what() const throw() override { 17 | return message.c_str(); 18 | } 19 | const std::string message; 20 | }; 21 | 22 | struct StatementError : public LDQueryError { 23 | explicit StatementError(const std::string& message) : LDQueryError(message) {} 24 | }; 25 | }}} // namespace facebook::logdevice::ldquery 26 | -------------------------------------------------------------------------------- /logdevice/ops/ldquery/Utils.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #include "logdevice/ops/ldquery/Utils.h" 9 | 10 | namespace facebook { namespace logdevice { namespace ldquery { 11 | 12 | std::string s(const folly::Optional& val) { 13 | return s(val ? *val : 0); 14 | } 15 | 16 | std::string s(const bool& val) { 17 | return s((int)val & 1); 18 | } 19 | 20 | std::string s(const folly::Optional& val) { 21 | return s(val ? val->count() : 0); 22 | } 23 | 24 | std::string s(const folly::Optional& val) { 25 | return s(val ? val->count() : 0); 26 | } 27 | 28 | }}} // namespace facebook::logdevice::ldquery 29 | -------------------------------------------------------------------------------- /logdevice/ops/ldquery/py/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | from __future__ import absolute_import, division, print_function, unicode_literals 9 | 10 | # pyre-fixme[21]: T48485855 11 | from logdevice.ldquery.internal.ext import LDQueryError, StatementError 12 | 13 | from .lib import LDQuery 14 | 15 | 16 | __all__ = ["LDQuery", "LDQueryError", "StatementError"] 17 | -------------------------------------------------------------------------------- /logdevice/ops/ldshell/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | -------------------------------------------------------------------------------- /logdevice/ops/ldshell/autoload/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | -------------------------------------------------------------------------------- /logdevice/ops/ldshell/autoload/commands/__init__.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | -------------------------------------------------------------------------------- /logdevice/ops/ldshell/autoload/commands/config.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | 9 | from nubia import command, context 10 | 11 | 12 | @command 13 | class Config: 14 | """ 15 | Commands about logdevice config 16 | """ 17 | 18 | @command 19 | async def dump(self): 20 | """ 21 | Prints the server config in JSON format 22 | """ 23 | ctx = context.get_context() 24 | async with ctx.get_cluster_admin_client() as client: 25 | print(await client.dumpServerConfigJson()) 26 | -------------------------------------------------------------------------------- /logdevice/ops/ldshell/autoload/statusbar.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | -------------------------------------------------------------------------------- /logdevice/ops/ldshell/main_py.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | 9 | import sys 10 | 11 | from ldshell.logdevice_plugin import LogDevicePlugin 12 | from nubia import Nubia 13 | 14 | 15 | def main(): 16 | plugin = LogDevicePlugin() 17 | shell = Nubia(name="ldshell", plugin=plugin) 18 | sys.exit(shell.run()) 19 | 20 | 21 | if __name__ == "__main__": 22 | main() 23 | -------------------------------------------------------------------------------- /logdevice/ops/py_extensions/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | add_subdirectory(admin_command_client) 8 | add_subdirectory(nodes_configuration) 9 | -------------------------------------------------------------------------------- /logdevice/ops/py_extensions/admin_command_client/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | add_library(admin_command_client STATIC AdminCommandClient.h AdminCommandClient.cpp) 8 | add_dependencies(admin_command_client folly) 9 | 10 | target_link_libraries(admin_command_client 11 | common 12 | admin-cpp2 13 | ${LOGDEVICE_EXTERNAL_DEPS} 14 | ) 15 | 16 | set_target_properties(admin_command_client 17 | PROPERTIES POSITION_INDEPENDENT_CODE ON) 18 | 19 | add_subdirectory(py) 20 | -------------------------------------------------------------------------------- /logdevice/ops/py_extensions/admin_command_client/py/admin_command_client.pyi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | 9 | from enum import IntEnum, auto 10 | 11 | class AdminCommandClientException(Exception): 12 | pass 13 | 14 | class ConnectionType(IntEnum): 15 | PLAIN = auto() 16 | SSL = auto() 17 | 18 | class AdminCommandClient: 19 | def send( 20 | self, cmd: str, host: str, port: int, timeout: float, conntype: ConnectionType 21 | ) -> str: ... 22 | -------------------------------------------------------------------------------- /logdevice/ops/py_extensions/nodes_configuration/nodes_configuration_manager.pyi: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python3 2 | 3 | # Copyright (c) Facebook, Inc. and its affiliates. 4 | # All rights reserved. 5 | # 6 | # This source code is licensed under the BSD-style license found in the 7 | # LICENSE file in the root directory of this source tree. 8 | 9 | class NodesConfigurationManagerParseException(Exception): ... 10 | class NodesConfigurationManagerApiException(Exception): ... 11 | 12 | def get_nodes_configuration(): ... 13 | def nodes_configuration_to_json(): ... 14 | def json_to_nodes_configuration(): ... 15 | def overwrite_nodes_configuration(): ... 16 | def provision_empty_nodes_configuration(server_config: str): ... 17 | def nodes_configuration_exists(server_config: str): ... 18 | -------------------------------------------------------------------------------- /logdevice/replication_checker/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | add_library(replication_checker_lib 8 | STATIC 9 | "LogErrorTracker.cpp" 10 | "ReplicationCheckerSettings.cpp") 11 | add_dependencies(replication_checker_lib folly common) 12 | 13 | add_executable(ld-replication-checker main.cpp) 14 | 15 | target_link_libraries(ld-replication-checker 16 | replication_checker_lib 17 | common 18 | ldclient_static 19 | logdevice_server 20 | ${LOGDEVICE_EXTERNAL_DEPS}) 21 | -------------------------------------------------------------------------------- /logdevice/server/GAP_onSent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/GAP_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | void GAP_onSent(const GAP_Message& msg, 14 | Status st, 15 | const Address& to, 16 | const SteadyTimestamp enqueue_time); 17 | }} // namespace facebook::logdevice 18 | -------------------------------------------------------------------------------- /logdevice/server/GOSSIP_onSent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/GOSSIP_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | void GOSSIP_onSent(const GOSSIP_Message& msg, 17 | Status st, 18 | const Address& to, 19 | const SteadyTimestamp enqueue_time); 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/GossipRequest.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | -------------------------------------------------------------------------------- /logdevice/server/RECORD_onSent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/Message.h" 11 | #include "logdevice/common/protocol/RECORD_Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | void RECORD_onSent(const RECORD_Message& msg, 15 | Status st, 16 | const Address& to, 17 | const SteadyTimestamp enqueue_time); 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/server/RecordCachePersistence.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | 12 | #include "logdevice/common/types_internal.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | class StorageThreadPool; 17 | 18 | /** 19 | * @file A function for persisting record caches for all logs stored 20 | * on a particular shard. Called at the very end of shutting down storage 21 | * threads, from the last thread to be shut down. 22 | */ 23 | 24 | namespace RecordCachePersistence { 25 | 26 | void persistRecordCaches(shard_index_t, StorageThreadPool*); 27 | } 28 | 29 | }} // namespace facebook::logdevice 30 | -------------------------------------------------------------------------------- /logdevice/server/STARTED_onSent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/Message.h" 11 | #include "logdevice/common/protocol/STARTED_Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | void STARTED_onSent(const STARTED_Message& msg, 15 | Status st, 16 | const Address& to, 17 | const SteadyTimestamp enqueue_time); 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/server/STORE_onSent.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/STORE_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | void STORE_onSent(const STORE_Message& msg, 14 | Status st, 15 | const Address& to, 16 | const SteadyTimestamp enqueue_time); 17 | }} // namespace facebook::logdevice 18 | -------------------------------------------------------------------------------- /logdevice/server/flaky_tests.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | # Integration tests disabled as faulty or flakey; removed from test 8 | # list to ensure result of CI run gives a clear signal 9 | set_tests_properties( 10 | "GOSSIP_MessageTest.SerializeAndDeserialize" 11 | "GOSSIP_MessageTest.SerializeAndDeserializeWithBoycott" 12 | "GOSSIP_MessageTest.SerializeAndDeserializeWithStarting" 13 | "GOSSIP_MessageTest.SerializeAndDeserializeWithVersions" 14 | "HealthMonitorTest.HealthMonitorDelayTest" 15 | PROPERTIES DISABLED TRUE) 16 | -------------------------------------------------------------------------------- /logdevice/server/locallogstore/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | auto_sources(locallogstore_hfiles "*.h" RECURSE 8 | "${LOGDEVICE_SERVER_DIR}/locallogstore/test" 9 | ) 10 | auto_sources(locallogstore_files "*.cpp" RECURSE 11 | "${LOGDEVICE_SERVER_DIR}/locallogstore/test" 12 | ) 13 | 14 | add_library(locallogstore_test_util STATIC 15 | ${locallogstore_hfiles} 16 | ${locallogstore_files} 17 | ) 18 | 19 | target_link_libraries(locallogstore_test_util 20 | common 21 | common_test_util 22 | ${GMOCK_LIBRARY} 23 | ${GTEST_LIBRARY} 24 | ) 25 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/CHECK_NODE_HEALTH_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/CHECK_NODE_HEALTH_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition 18 | CHECK_NODE_HEALTH_onReceived(CHECK_NODE_HEALTH_Message* msg, 19 | const Address& from); 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/CHECK_SEAL_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/CHECK_SEAL_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition CHECK_SEAL_onReceived(CHECK_SEAL_Message* msg, 18 | const Address& from); 19 | }} // namespace facebook::logdevice 20 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/DATA_SIZE_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/DATA_SIZE_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition DATA_SIZE_onReceived(DATA_SIZE_Message* msg, 18 | const Address& from); 19 | }} // namespace facebook::logdevice 20 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/DELETE_LOG_METADATA_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/DELETE_LOG_METADATA_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition 18 | DELETE_LOG_METADATA_onReceived(DELETE_LOG_METADATA_Message* msg, 19 | const Address& from); 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/DELETE_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/DELETE_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition DELETE_onReceived(DELETE_Message* msg, 18 | const Address& from); 19 | }} // namespace facebook::logdevice 20 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/FINDKEY_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/PermissionChecker.h" 11 | #include "logdevice/common/protocol/FINDKEY_Message.h" 12 | #include "logdevice/common/protocol/Message.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | struct Address; 17 | 18 | Message::Disposition 19 | FINDKEY_onReceived(FINDKEY_Message* msg, 20 | const Address& from, 21 | PermissionCheckStatus permission_status); 22 | }} // namespace facebook::logdevice 23 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/GET_EPOCH_RECOVERY_METADATA_REPLY_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/GET_EPOCH_RECOVERY_METADATA_REPLY_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition GET_EPOCH_RECOVERY_METADATA_REPLY_onReceived( 18 | GET_EPOCH_RECOVERY_METADATA_REPLY_Message* msg, 19 | const Address& from); 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/GET_EPOCH_RECOVERY_METADATA_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/GET_EPOCH_RECOVERY_METADATA_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition 18 | GET_EPOCH_RECOVERY_METADATA_onReceived(GET_EPOCH_RECOVERY_METADATA_Message* msg, 19 | const Address& from); 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/GET_HEAD_ATTRIBUTES_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/GET_HEAD_ATTRIBUTES_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition 18 | GET_HEAD_ATTRIBUTES_onReceived(GET_HEAD_ATTRIBUTES_Message* msg, 19 | const Address& from); 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/GET_TRIM_POINT_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #pragma once 10 | 11 | #include "logdevice/common/protocol/GET_TRIM_POINT_Message.h" 12 | #include "logdevice/common/protocol/Message.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | struct Address; 17 | 18 | Message::Disposition GET_TRIM_POINT_onReceived(GET_TRIM_POINT_Message* msg, 19 | const Address& from); 20 | 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/GOSSIP_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/GOSSIP_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | Message::Disposition GOSSIP_onReceived(GOSSIP_Message* msg, 17 | const Address& from); 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/LOGS_CONFIG_API_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/PermissionChecker.h" 11 | #include "logdevice/common/protocol/LOGS_CONFIG_API_Message.h" 12 | #include "logdevice/common/protocol/Message.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | struct Address; 17 | 18 | Message::Disposition 19 | LOGS_CONFIG_API_onReceived(LOGS_CONFIG_API_Message* msg, 20 | const Address& from, 21 | PermissionCheckStatus permission_status); 22 | }} // namespace facebook::logdevice 23 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/MEMTABLE_FLUSHED_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/MEMTABLE_FLUSHED_Message.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition MEMTABLE_FLUSHED_onReceived(MEMTABLE_FLUSHED_Message* msg, 18 | const Address& from); 19 | 20 | }} // namespace facebook::logdevice 21 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/SEAL_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/Message.h" 11 | #include "logdevice/common/protocol/SEAL_Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition SEAL_onReceived(SEAL_Message* msg, const Address& from); 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/START_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/PermissionChecker.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | #include "logdevice/common/protocol/START_Message.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | struct Address; 17 | 18 | Message::Disposition START_onReceived(START_Message* msg, 19 | const Address& from, 20 | PermissionCheckStatus permission_status); 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/STOP_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/Message.h" 11 | #include "logdevice/common/protocol/STOP_Message.h" 12 | 13 | namespace facebook { namespace logdevice { 14 | 15 | struct Address; 16 | 17 | Message::Disposition STOP_onReceived(STOP_Message* msg, const Address& from); 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/STORED_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/STORED_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | Message::Disposition STORED_onReceived(STORED_Message* msg, 14 | const Address& from); 15 | }} // namespace facebook::logdevice 16 | -------------------------------------------------------------------------------- /logdevice/server/message_handlers/TRIM_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/PermissionChecker.h" 11 | #include "logdevice/common/protocol/Message.h" 12 | #include "logdevice/common/protocol/TRIM_Message.h" 13 | 14 | namespace facebook { namespace logdevice { 15 | 16 | struct Address; 17 | 18 | Message::Disposition TRIM_onReceived(TRIM_Message* msg, 19 | const Address& from, 20 | PermissionCheckStatus permission_status); 21 | }} // namespace facebook::logdevice 22 | -------------------------------------------------------------------------------- /logdevice/server/sequencer_boycotting/NODE_STATS_AGGREGATE_REPLY_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/NODE_STATS_AGGREGATE_REPLY_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | Message::Disposition 14 | NODE_STATS_AGGREGATE_REPLY_onReceived(NODE_STATS_AGGREGATE_REPLY_Message* msg, 15 | const Address& from); 16 | }} // namespace facebook::logdevice 17 | -------------------------------------------------------------------------------- /logdevice/server/sequencer_boycotting/NODE_STATS_AGGREGATE_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/NODE_STATS_AGGREGATE_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | Message::Disposition 14 | NODE_STATS_AGGREGATE_onReceived(NODE_STATS_AGGREGATE_Message* msg, 15 | const Address& from); 16 | }} // namespace facebook::logdevice 17 | -------------------------------------------------------------------------------- /logdevice/server/sequencer_boycotting/NODE_STATS_onReceived.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include "logdevice/common/protocol/NODE_STATS_Message.h" 11 | 12 | namespace facebook { namespace logdevice { 13 | class BoycottingStats; 14 | 15 | Message::Disposition NODE_STATS_onReceived(NODE_STATS_Message* msg, 16 | const Address& from, 17 | BoycottingStatsHolder* stats); 18 | }} // namespace facebook::logdevice 19 | -------------------------------------------------------------------------------- /logdevice/server/test/configs/local_scd_test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "local_scd_test", 3 | "logs": [ 4 | { 5 | "name": "log1", 6 | "id": "1", 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 1000000, 10 | "sequencer_affinity": "rgn1...." 11 | }, 12 | { 13 | "name": "log2", 14 | "id": "2", 15 | "replication_factor": 1, 16 | "synced_copies": 0, 17 | "max_writes_in_flight": 1000000, 18 | "sequencer_affinity": "rgn2...." 19 | }, 20 | { 21 | "name": "log3", 22 | "id": "3", 23 | "replication_factor": 1, 24 | "synced_copies": 0, 25 | "max_writes_in_flight": 1000000, 26 | "sequencer_affinity": "rgn3...." 27 | } 28 | ], 29 | "metadata_logs": { 30 | "nodeset": [0, 1, 2, 3, 4, 5], 31 | "replication_factor": 2 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /logdevice/server/test/configs/unreleased_record_detector_test.conf: -------------------------------------------------------------------------------- 1 | { 2 | "cluster": "unreleased_record_detector_test", 3 | "logs": [ 4 | { 5 | "name": "test", 6 | "id": 1, 7 | "replication_factor": 1, 8 | "synced_copies": 0, 9 | "max_writes_in_flight": 16 10 | } 11 | ], 12 | "metadata_logs": { 13 | "nodeset": [0], 14 | "replication_factor": 1 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/server/util.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | #include 11 | #include 12 | 13 | #include 14 | 15 | namespace facebook { namespace logdevice { 16 | 17 | class LogStorageStateMap; 18 | class ShardedStorageThreadPool; 19 | 20 | /** 21 | * Persist last released LSNs for all logs to the local log store. This is 22 | * called by shutdown_server() when the storage node is shutting down. 23 | */ 24 | void dump_release_states(const LogStorageStateMap& map, 25 | ShardedStorageThreadPool& pool); 26 | 27 | }} // namespace facebook::logdevice 28 | -------------------------------------------------------------------------------- /logdevice/test/StrongTypedefTest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2019-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include 10 | 11 | #include "logdevice/include/strong_typedef.h" 12 | #include "logdevice/test/utils/IntegrationTestBase.h" 13 | 14 | using namespace facebook::logdevice; 15 | 16 | class StrongTypedefTest : public IntegrationTestBase {}; 17 | 18 | LOGDEVICE_STRONG_TYPEDEF(uint64_t, test_logdevice_type_t); 19 | 20 | TEST_F(StrongTypedefTest, ComparisonOperatorsTest) { 21 | test_logdevice_type_t a(1); 22 | test_logdevice_type_t b(2); 23 | 24 | ASSERT_EQ(a, a); 25 | ASSERT_NE(a, b); 26 | 27 | ASSERT_LT(a, b); 28 | ASSERT_LE(a, a); 29 | ASSERT_GT(b, a); 30 | ASSERT_GE(b, b); 31 | } 32 | -------------------------------------------------------------------------------- /logdevice/test/ThriftApiIntegrationTest.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include 10 | 11 | #include "logdevice/test/ThriftApiIntegrationTestBase.h" 12 | 13 | namespace facebook { namespace logdevice { namespace test { namespace { 14 | 15 | class ThriftApiIntegrationTest : public ThriftApiIntegrationTestBase {}; 16 | 17 | TEST_F(ThriftApiIntegrationTest, TestSingleRpcCall) { 18 | checkSingleRpcCall(); 19 | } 20 | 21 | }}}} // namespace facebook::logdevice::test:: 22 | -------------------------------------------------------------------------------- /logdevice/test/flaky_tests.cmake: -------------------------------------------------------------------------------- 1 | # Copyright (c) 2018-present, Facebook, Inc. and its affiliates. 2 | # All rights reserved. 3 | # 4 | # This source code is licensed under the BSD-style license found in the 5 | # LICENSE file in the root directory of this source tree. 6 | 7 | # Integration tests disabled as faulty or flakey; removed from test 8 | # list to ensure result of CI run gives a clear signal 9 | set_tests_properties( 10 | "ServerBasedNodesConfigurationStoreTest.SuccessScenario" 11 | "SequencerIntegrationTest.MetaDataWritePreempted" 12 | PROPERTIES DISABLED TRUE) 13 | -------------------------------------------------------------------------------- /logdevice/test/ldbench/worker/Kafka_conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "global-config": { 3 | "bootstrap.servers":"logdevicef397.prn3.facebook.com:9092", 4 | "log.connection.close":false, 5 | "socket.keepalive.enable":true, 6 | "queue.buffering.max.kbytes":2097151, 7 | "batch.num.messages":100000, 8 | "queue.buffering.max.ms":60, 9 | "delivery.timeout.ms":0, 10 | "request.timeout.ms":60000, 11 | "socket.timeout.ms":60000 12 | }, 13 | "topic-config": { 14 | "acks":-1 15 | }, 16 | "poll-thread-count":1 17 | } 18 | -------------------------------------------------------------------------------- /logdevice/test/ldbench/worker/LogStoreClient.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include "logdevice/test/ldbench/worker/LogStoreClient.h" 10 | 11 | namespace facebook { namespace logdevice { namespace ldbench { 12 | 13 | void LogStoreClient::setAppendStatsUpdateCallBack( 14 | write_stats_update_callback_t stats_update_cb) { 15 | writer_stats_update_cb_ = stats_update_cb; 16 | } 17 | 18 | void LogStoreClient::setReadStatsUpdateCallBack( 19 | read_stats_update_callback_t reader_stats_updates_cb) { 20 | reader_stats_updates_cb_ = reader_stats_updates_cb; 21 | } 22 | 23 | }}} // namespace facebook::logdevice::ldbench 24 | -------------------------------------------------------------------------------- /logdevice/test/phony_main.cpp: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | 9 | #include 10 | #include 11 | #include 12 | int main(int argc, char** argv) { 13 | ::testing::InitGoogleTest(&argc, argv); 14 | folly::init(&argc, &argv); 15 | return RUN_ALL_TESTS(); 16 | } 17 | -------------------------------------------------------------------------------- /logdevice/test/utils/util.h: -------------------------------------------------------------------------------- 1 | /** 2 | * Copyright (c) 2017-present, Facebook, Inc. and its affiliates. 3 | * All rights reserved. 4 | * 5 | * This source code is licensed under the BSD-style license found in the 6 | * LICENSE file in the root directory of this source tree. 7 | */ 8 | #pragma once 9 | 10 | namespace facebook { namespace logdevice { namespace IntegrationTestUtils { 11 | 12 | int dump_file_to_stderr(const char* path); 13 | 14 | }}} // namespace facebook::logdevice::IntegrationTestUtils 15 | -------------------------------------------------------------------------------- /logdevice/tools/ldadmin/main.cpp: -------------------------------------------------------------------------------- 1 | // Copyright 2004-present Facebook. All Rights Reserved. 2 | 3 | #include "logdevice/tools/ldadmin/LDAdmin.h" 4 | 5 | using namespace facebook::logdevice; 6 | 7 | int main(int argc, const char* argv[]) { 8 | LDAdmin admin; 9 | 10 | HostOptionPlugin host_option( 11 | "host", "Hostname of the admin server", "localhost:6440"); 12 | UnixPathOptionPlugin unix_path_option( 13 | "unix-path", "Unix path of the admin server.", std::string{}); 14 | auto result = admin.registerTransportOptionPlugin(host_option) && 15 | admin.registerTransportOptionPlugin(unix_path_option) && 16 | admin.parse_command_line(argc, argv) && admin.run(); 17 | return result ? EXIT_SUCCESS : EXIT_FAILURE; 18 | } 19 | -------------------------------------------------------------------------------- /website/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "scripts": { 3 | "examples": "docusaurus-examples", 4 | "start": "docusaurus-start", 5 | "build": "docusaurus-build", 6 | "publish-gh-pages": "docusaurus-publish", 7 | "write-translations": "docusaurus-write-translations", 8 | "version": "docusaurus-version", 9 | "rename-version": "docusaurus-rename-version" 10 | }, 11 | "devDependencies": { 12 | "docusaurus": "^1.14.3" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /website/static/.circleci/config.yml: -------------------------------------------------------------------------------- 1 | # Circle CI 2.0 Config File 2 | # This config file will prevent tests from being run on the gh-pages branch. 3 | version: 2 4 | jobs: 5 | build: 6 | machine: true 7 | branches: 8 | ignore: gh-pages 9 | steps: 10 | - run: echo "Skipping tests on gh-pages branch" 11 | -------------------------------------------------------------------------------- /website/static/.nojekyll: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/.nojekyll -------------------------------------------------------------------------------- /website/static/img/facebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/facebook.png -------------------------------------------------------------------------------- /website/static/img/facebook_logdevice_whitewordmark.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/facebook_logdevice_whitewordmark.png -------------------------------------------------------------------------------- /website/static/img/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/favicon.png -------------------------------------------------------------------------------- /website/static/img/favicon/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/favicon/favicon.ico -------------------------------------------------------------------------------- /website/static/img/logdevice.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/logdevice.png -------------------------------------------------------------------------------- /website/static/img/logdevice.svg: -------------------------------------------------------------------------------- 1 | facebook_logdevice_fullcolormark -------------------------------------------------------------------------------- /website/static/img/logdevice_og.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/logdevice_og.png -------------------------------------------------------------------------------- /website/static/img/oss_logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/oss_logo.png -------------------------------------------------------------------------------- /website/static/img/top_bg_dc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/facebookarchive/LogDevice/ce7726050edc49a1e15d9160e81c890736b779e2/website/static/img/top_bg_dc.png -------------------------------------------------------------------------------- /website/versioned_docs/version-2.46.5/doxygen.md: -------------------------------------------------------------------------------- 1 | --- 2 | id: version-2.46.5-API_Doxygen 3 | title: Reference 4 | sidebar_label: Reference 5 | original_id: API_Doxygen 6 | --- 7 | [**The LogDevice C++ API reference is generated using Doxygen**](../api/annotated.html). 8 | -------------------------------------------------------------------------------- /website/versions.json: -------------------------------------------------------------------------------- 1 | [ 2 | "latest", 3 | "2.46.5" 4 | ] 5 | --------------------------------------------------------------------------------