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-4461: Use logback in zookeeper-contrib project #108

Conversation

rahulrane50
Copy link
Collaborator

@rahulrane50 rahulrane50 commented Sep 25, 2022

Description

Cherry picking second commit for log4j to logback : PR

Cherry picked fix for flaky ctest : PR

Tests

CI and end-to-end tests pipeline

Local zk server testing.

Changes that Break Backward Compatibility (Optional)

NA

Documentation (Optional)

NA

anmolnar and others added 2 commits September 25, 2022 14:29
I've only found Ant references in the `-recipes` projects which I don't necesseraly want to migrate, so this patch is focusing on `-contrib` projects.

Please review.

Author: Andor Molnar <[email protected]>

Reviewers: Enrico Olivelli <[email protected]>

Closes apache#1807 from anmolnar/ZOOKEEPER-4461
With these commits, the various tests in `TestOperations.cc` set the `last_sent` and `last_recv` fields of the "force-connected" ZooKeeper handle to deterministic values (which match the initial value of the time mock).

When that value is not specified, these fields get set to the "real" time at the end of the  `forceConnected` function, which can be sufficiently different from the value held in the mock for some of the tests to fail.

Author: Damien Diederen <[email protected]>

Reviewers: Enrico Olivelli <[email protected]>

Closes apache#1827 from ztzg/ZOOKEEPER-4479-flaky-c-test-operations
@rahulrane50
Copy link
Collaborator Author

@desaikomal

@rahulrane50 rahulrane50 marked this pull request as ready for review September 26, 2022 19:11
Comment on lines +537 to +543
if (last_recv_send) {
zh->last_recv = *last_recv_send;
zh->last_send = *last_recv_send;
} else {
gettimeofday(&zh->last_recv,0);
gettimeofday(&zh->last_send,0);
}
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For my own knowledge, what is this change, is this related to logback?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nope it's not related to logback but fixing one flaky c test in CI. My bad i should have separated out these changes will keep that in mind from next time :)

Copy link

@mgao0 mgao0 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@rahulrane50 rahulrane50 merged commit 2e8a9b5 into linkedin:li-dev/log4j-to-logback Sep 29, 2022
abhilash1in pushed a commit that referenced this pull request Jun 16, 2023
* ZOOKEEPER-4461: Use logback in zookeeper-contrib project

* ZOOKEEPER-4479: C tests: Avoid some jitter which results in flaky tests
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.

6 participants