Skip to content

Issue1897 #1980

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

Merged
merged 7 commits into from
Nov 16, 2023
Merged

Issue1897 #1980

merged 7 commits into from
Nov 16, 2023

Conversation

miklish
Copy link
Collaborator

@miklish miklish commented Nov 9, 2023

Issue: #1897

NOTE: This should be merged AFTER pr #1963 has been merged

1. Make Correction to comments in ConsulRegistry.lookupServiceUpdate

consul module; com.networknt.consul.client.ConsulRegistry.lookupServiceUpdate:

  • Currently, the comments inside the body of the ConsulRegistry.lookupServiceUpdate method incorrectly state:

"Indicate to updateServiceCache() to leave cache unchanged for now: serviceUrls.isEmpty() == true && serviceUrls.get(serviceName) != null && serviceUrls.get(serviceName).size() == 0"

  • This is incorrect. It should state:

"Indicate to updateServiceCache() to leave cache unchanged for now: serviceUrls.isEmpty() == true"

  • This update correctly aligns with the lookupServiceUpdate Javadoc comments at the top of the method, specifically where it is stated that:

if: Consul index was stale, or Consul reported no updates since last query then: serviceUrls.size() == 0 (e.g.: Map has no k/v pairs)"

  • This also correctly aligns with the behaviour of com.networknt.consul.ConsulRegistry.updateServiceCache()

Michael Christoff added 6 commits November 8, 2023 01:20
…ClientConnection -> SimpleUndertowConnection, and SimpleClientConnectionMaker -> SimpleUndertowConnectionMaker
…onState, SimpleClientConnection -> SimpleUndertowConnection, SimpleClientConnectionMaker -> SimpleUndertowConnectionMaker, and removed the reuseConnection() method from the SimpleConnectionMaker interface. 2. Performance optimizations. 3. Numerous refactorings 4. Major update to documentation 5. Minor re-organization of connection management logic
… etc...) is not run unless debug logging is enabled
…ance in a multithreaded environment by making its instance reference volatile and making its default constructor private
…explain how serviceUrls.size() == 0 will ensure that updateServiceCache() does not modify the service IP cache
@stevehu stevehu merged commit b746367 into 1.6.x Nov 16, 2023
@stevehu stevehu deleted the issue1897 branch November 16, 2023 18:09
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