Skip to content

Feat config management #5388

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 18 commits into
base: main
Choose a base branch
from

Conversation

boomballa
Copy link

Summary

This PR enhances DragonflyDB's INFO SERVER output to be more compatible with Redis, by adding several key fields.

Features

  • INFO SERVER now reports the following fields, matching Redis output and order:
    • hz
    • process_id
    • executable
    • config_file
  • These fields are now visible in the info server output, for example:
    # Server
    redis_version:7.4.0
    dragonfly_version:df-dev
    redis_mode:cluster
    arch_bits:64
    process_id:2396326
    os:Linux 5.10.0-32-amd64 x86_64
    thread_count:40
    multiplexing_api:iouring
    tcp_port:7379
    uptime_in_seconds:274
    uptime_in_days:0
    hz:80
    executable:/usr/bin/dragonfly
    config_file:/home/dba/dragonfly/dragonfly7379/dragonfly7379.cnf
    

Implementation Details

  • Global variables for executable and config_file are set at startup and used for info reporting.
  • hz is reported using the value of the FLAGS_hz flag.
  • process_id is reported using getpid() for portability.
  • No changes to CONFIG GET config_file or CONFIG REWRITE are included in this PR; those features will be submitted separately.
  • All code comments are in English.

Compatibility

  • Output is now more compatible with Redis for the INFO SERVER section.
  • No breaking changes.

Checklist

  • All commits are signed.
  • PR title follows the conventional commit spec.
  • Only necessary files are changed.
  • All code comments are in English.

Closes: #3789

@boomballa
Copy link
Author

Hey @romange , Roman here! I'm back again 😅 First off, I really appreciate your patience with my PR—sorry for the extra time spent on details. But I couldn't resist swinging by to chip in a little more for the project! 😄
If there's anything to improve, please cue me anytime !

@romange
Copy link
Collaborator

romange commented Jun 30, 2025

Thank you @boomballa 🙏🏼

boomballa and others added 3 commits July 1, 2025 14:39
@boomballa
Copy link
Author

Hey @romange , thanks a bunch! With your suggestions and edits, this PR has become so much more concise. Really appreciate your help. I’ll be more mindful of code submission standards moving forward. Thanks again! 🙏

@kostasrim
Copy link
Contributor

Hi @boomballa,

It looks like we have a crash in the tests. See https://github.com/dragonflydb/dragonfly/actions/runs/15992173518/job/45107833943?pr=5388

trace:

77: *** SIGABRT received at time=1751354741 on cpu 1 ***
77: PC: @     0x7f601d2c900b  (unknown)  raise
77:     @          0x142b38c         64  absl::lts_20240722::WriteFailureInfo()
77:     @          0x142b5fe        112  absl::lts_20240722::AbslFailureSignalHandler()
77:     @     0x7f601db4a420       5136  (unknown)
77:     @          0x1457e1a        256  absl::lts_20240722::raw_log_internal::RawLog()
77:     @          0x1457cd0         64  absl::lts_20240722::raw_log_internal::(anonymous namespace)::DefaultInternalLog()
77:     @          0x13bb0f0         96  absl::lts_20240722::base_internal::AtomicHook<>::operator()<>()
77:     @          0x13c8e5d        304  absl::lts_20240722::flags_internal::FlagImpl::AssertValidType()
77:     @           0x59de23         64  absl::lts_20240722::flags_internal::Flag<>::Get()
77:     @           0x598129         32  absl::lts_20240722::flags_internal::FlagImplPeer::InvokeGet<>()
77:     @           0x592bb3         32  absl::lts_20240722::GetFlag<>()
77:     @           0x7146dc        288  dfly::ServerFamily::FormatInfoMetrics[abi:cxx11]()::{lambda()#3}::operator()()
77:     @           0x71974d       1328  dfly::ServerFamily::FormatInfoMetrics[abi:cxx11]()
77:     @           0x71a9b5       2496  dfly::ServerFamily::Info()
77:     @           0x6fe77c         48  dfly::(anonymous namespace)::HandlerFunc()::{lambda()#1}::operator()()
77:     @           0x74e0ff         64  fu2::abi_400::detail::invocation::invoke<>()
77:     @           0x746ae0        112  fu2::abi_400::detail::type_erasure::invocation_table::function_trait<>::internal_invoker<>::invoke()
77:     @           0xd9cc53        112  fu2::abi_400::detail::type_erasure::tables::vtable<>::invoke<>()
77:     @           0xd9ccec        112  fu2::abi_400::detail::type_erasure::erasure<>::invoke<>()
77:     @           0xd9cd6a         80  fu2::abi_400::detail::type_erasure::invocation_table::operator_impl<>::operator()()
77:     @           0xd9962e        240  dfly::CommandId::Invoke()
77:     @           0x5fdf9f        624  dfly::Service::InvokeCmd()
77:     @           0x5fcfb0        528  dfly::Service::DispatchCommand()
77:     @           0x55fd9f        336  dfly::BaseFamilyTest::Run()
77:     @           0x55f664        160  dfly::BaseFamilyTest::Run()
77:     @           0x4b2502         96  dfly::BaseFamilyTest::Run()
77:     @           0x493b00        144  dfly::SearchFamilyTest_SearchStatsInfoRace_Test::TestBody()::{lambda()#2}::operator()()
77:     @           0x49f600         32  std::__invoke_impl<>()
77:     @           0x49dfd1         32  std::__invoke<>()
77:     @           0x49caa9         32  std::__apply_impl<>()
77:     @           0x49cae3         48  std::apply<>()
77:     @           0x49cb61         96  util::fb2::detail::WorkerFiberImpl<>::run_()
77:     @           0x49b993         80  util::fb2::detail::WorkerFiberImpl<>::WorkerFiberImpl<>()::{lambda()#1}::operator()()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants