Skip to content

Conversation

@everpcpc
Copy link
Member

@everpcpc everpcpc commented Nov 21, 2025

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

This PR updates the databend-query.service systemd unit file to ensure proper startup ordering when databend-meta and databend-query are deployed on the same machine, while maintaining flexibility for separate deployments.

Background:

  • databend-meta and databend-query can be deployed either on the same machine or on different machines
  • When deployed together, databend-query needs to start after databend-meta to ensure the meta service is ready
  • However, we cannot use a hard dependency (like Requires=) because the services may be deployed separately

Solution:
Added databend-meta.service to the After= directive in databend-query.service. This ensures:

  • On the same machine: databend-query will start after databend-meta if both services exist
  • On different machines: If databend-meta.service doesn't exist, systemd will simply ignore the directive and databend-query can start normally
  • No hard dependency: Using only After= without Requires= or Wants= means the services are not tightly coupled

Related.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - This is a systemd configuration change that doesn't require automated testing. Manual verification of service startup order is sufficient.

Type of change

  • Bug Fix (non-breaking change which fixes an issue)
  • New Feature (non-breaking change which adds functionality)
  • Breaking Change (fix or feature that could cause existing functionality not to work as expected)
  • Documentation Update
  • Refactoring
  • Performance Improvement
  • Other (please describe): Infrastructure/Deployment configuration improvement

This change is Reviewable

@github-actions github-actions bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Nov 21, 2025
@BohuTANG
Copy link
Member

@codex review

@chatgpt-codex-connector
Copy link

Codex Review: Didn't find any major issues. You're on a roll.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@everpcpc everpcpc merged commit 0c54db8 into databendlabs:main Nov 21, 2025
10 checks passed
@everpcpc everpcpc deleted the fix-service branch November 21, 2025 02:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-chore this PR only has small changes that no need to record, like coding styles.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: packaged systemd’s service file for databend-query does not depend on databend-meta

2 participants