Skip to content
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

ZOOKEEPER-4703: Datadir and DatalogDir size are incorrect #2060

Merged
merged 1 commit into from
Feb 7, 2024

Conversation

SiyaoIsHiding
Copy link
Contributor

As in the class FileTxnSnapLog

    //the directory containing
    //the transaction logs
    final File dataDir;
    //the directory containing
    //the snapshot directory
    final File snapDir;

The DataDir is the one for logs. Therefore, the file path for DataDirSize and LogDirSize should be swapped.

@SiyaoIsHiding SiyaoIsHiding marked this pull request as ready for review September 5, 2023 06:57
@maoling
Copy link
Member

maoling commented Feb 6, 2024

Great catch. Incredible. this issue existed for almost 9 years.
Since it only exposed some metrics(e.g. /commands/dirs) and don't affect the core function, so nobody realized it.

@maoling maoling closed this Feb 6, 2024
@maoling maoling reopened this Feb 6, 2024
@maoling maoling merged commit 5f66da1 into apache:master Feb 7, 2024
12 checks passed
@maoling
Copy link
Member

maoling commented Feb 7, 2024

@SiyaoIsHiding
Thanks for your contribution.

@anmolnar
Copy link
Contributor

anmolnar commented Feb 9, 2024

@SiyaoIsHiding @maoling

Great fix, but where's the unit test that catches it?
Please also make sure it's backported to active branches.

@li4wang
Copy link
Contributor

li4wang commented Feb 12, 2024

#2043 has unit test for it.

AlphaCanisMajoris pushed a commit to AlphaCanisMajoris/zookeeper that referenced this pull request Mar 28, 2024
Author: SiyaoIsHiding
Closes apache#2060 from SiyaoIsHiding/ZOOKEEPER-4703
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.

4 participants