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

Introduce creation_time field into host description #13631

Merged
merged 43 commits into from
Nov 25, 2020

Conversation

nezdolik
Copy link
Member

Signed-off-by: Kateryna Nezdolii [email protected]

Description: Introducing "host creation time" field into host description. This change is prerequisite for supporting slow start in Envoy (#13176) and as it touches lots of code, it was decided to factor it out into dedicated PR.
Risk Level: Medium
Testing: In progress
Docs Changes: NA

@@ -7,6 +7,9 @@ def envoy_copts(repository, test = False):
posix_options = [
"-Wall",
"-Wextra",
"-Wno-sign-compare",
Copy link
Member Author

Choose a reason for hiding this comment

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

this will be cleaned up

@mattklein123
Copy link
Member

Let me know when this is ready for review!

/wait

@nezdolik
Copy link
Member Author

Managed to track down duplicated time source issue in failing tests (original_dst, logical_dns tests) with gdb and fixed it. Updated all tests under common/upstream and some under common/http. Need to fix the rest of tests. But now is Friday and am signing off :)

Kateryna Nezdolii added 3 commits November 3, 2020 19:57
Signed-off-by: Kateryna Nezdolii <[email protected]>
Signed-off-by: Kateryna Nezdolii <[email protected]>
Signed-off-by: Kateryna Nezdolii <[email protected]>
@nezdolik
Copy link
Member Author

nezdolik commented Nov 4, 2020

my local machine clang formatter + buildifier formatted all bazel BUILD files (moved licence part at the top of file). Fixed that problem with running formatting in Docker

Kateryna Nezdolii added 2 commits November 4, 2020 19:44
Signed-off-by: Kateryna Nezdolii <[email protected]>
Signed-off-by: Kateryna Nezdolii <[email protected]>
Signed-off-by: Kateryna Nezdolii <[email protected]>
Signed-off-by: Kateryna Nezdolii <[email protected]>
@nezdolik
Copy link
Member Author

@mattklein123 done

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks LGTM with small comments.

/wait

@@ -156,6 +158,7 @@ class HostDescriptionImpl : virtual public HostDescription,
HealthCheckHostMonitorPtr health_checker_;
std::atomic<uint32_t> priority_;
Network::TransportSocketFactory& socket_factory_;
MonotonicTime creation_time_;
Copy link
Member

Choose a reason for hiding this comment

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

nit: const

redis_discovery_session_.resolve_timer_->enableTimer(std::chrono::milliseconds(0));
})) {
})),
time_source_(dispatcher_.timeSource()) {
Copy link
Member

Choose a reason for hiding this comment

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

Can we have time_source_ in BaseDynamicClusterImpl or one of the other cluster base classes vs. having it in every derived class? That might be a bit simpler and cleaner?

Signed-off-by: Kateryna Nezdolii <[email protected]>
@mattklein123
Copy link
Member

Not sure what is up with CI but pretty sure this is not going to pass format.

/wait

Signed-off-by: Kateryna Nezdolii <[email protected]>
@nezdolik
Copy link
Member Author

Not sure what is up with CI but pretty sure this is not going to pass format.

/wait

Oh, i had git rebase in progress and did not notice it, so one commit did not got pushed to remote...

fix
Signed-off-by: Kateryna Nezdolii <[email protected]>
@nezdolik
Copy link
Member Author

build pipeline on my dev box started failing with gcc, trying to fix it now and rerun build and tests.

fix
Signed-off-by: Kateryna Nezdolii <[email protected]>
fix
Signed-off-by: Kateryna Nezdolii <[email protected]>
@nezdolik
Copy link
Member Author

upgrading gcc,g++ to v 10 and purging bazel cache helped. I will keep pushing commits here to get faster feedback loop cycle. Am also running checks on devbox, but they are slower.

@nezdolik
Copy link
Member Author

@mattklein123 PTAL

Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

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

Thanks! Feel free to fix the comment nit in your next change.

@@ -148,6 +149,11 @@ class HostDescription {
* Set the current priority.
*/
virtual void priority(uint32_t) PURE;

/**
* @return timestamp in milliseconds of when host was created.
Copy link
Member

Choose a reason for hiding this comment

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

nit:

Suggested change
* @return timestamp in milliseconds of when host was created.
* @return timestamp when host was created.

@mattklein123 mattklein123 merged commit bbb81e4 into envoyproxy:master Nov 25, 2020
@nezdolik nezdolik deleted the host-create_time branch November 26, 2020 10:25
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.

2 participants