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

Port #7925 and #8365 from core strategies to parent_select plugin #8590

Merged
merged 1 commit into from
Jan 31, 2022

Conversation

rob05c
Copy link
Member

@rob05c rob05c commented Jan 7, 2022

Ports #7925 and #8365 from core strategies to parent_select plugin.

PR #7925 adds go_direct support to peering_ring strategies.
PR #8365 refactors strategy consistent hashing to fix a bug.

They both essentially completely rewrite the strategy consistent
hashing, so it was safer and easier to port them both at the same
time.

This PR is based on #8580 - recommend merging that first.

@rob05c rob05c requested review from bryancall and zwoop as code owners January 7, 2022 20:30
@rob05c rob05c force-pushed the port-strategy-findNextHop-changes branch from 8905dbf to 7a65ccc Compare January 7, 2022 20:35
@rob05c rob05c marked this pull request as draft January 7, 2022 21:28
@rob05c rob05c changed the title Ports #7925 and #8365 from core strategies to parent_select plugin Port #7925 and #8365 from core strategies to parent_select plugin Jan 10, 2022
@rob05c rob05c force-pushed the port-strategy-findNextHop-changes branch from 7a65ccc to ede99b0 Compare January 11, 2022 21:12
@rob05c rob05c marked this pull request as ready for review January 11, 2022 21:13
@ywkaras
Copy link
Contributor

ywkaras commented Jan 13, 2022

Can you, as a part of this PR, create versions of the Au tests zzz_strategies_peer.test.py and zzz_strategies_peer2.test.py that utilize the plugin rather than strategies.yaml?

@rob05c rob05c force-pushed the port-strategy-findNextHop-changes branch from ede99b0 to 04a4e29 Compare January 14, 2022 17:41
@rob05c rob05c force-pushed the port-strategy-findNextHop-changes branch from 04a4e29 to 5b63da3 Compare January 14, 2022 18:08
@rob05c
Copy link
Member Author

rob05c commented Jan 14, 2022

Can you, as a part of this PR, create versions of the Au tests zzz_strategies_peer.test.py and zzz_strategies_peer2.test.py that utilize the plugin rather than strategies.yaml?

Done.

@rob05c rob05c force-pushed the port-strategy-findNextHop-changes branch from 5b63da3 to b68b14d Compare January 14, 2022 21:11
ywkaras
ywkaras previously approved these changes Jan 14, 2022
@randall randall added this to the 10.0.0 milestone Jan 18, 2022
@randall randall added the Tests label Jan 18, 2022
Ports apache#7925 and apache#8365 from core strategies to parent_select plugin.

PR apache#7925 adds go_direct support to peering_ring strategies.
PR apache#8365 refactors strategy consistent hashing to fix a bug.

They both essentially completely rewrite the strategy consistent
hashing, so it was safer and easier to port them both at the same
time.

Add parent_select plugin autests

Tests are mostly copied from the core strategies tests, which makes
sense since the plugin strategies should behave the same as core.
@rob05c rob05c force-pushed the port-strategy-findNextHop-changes branch from b68b14d to c89b77e Compare January 28, 2022 16:58
@@ -297,6 +320,8 @@ PLNextHopConsistentHash::next(TSHttpTxn txnp, void *strategyTxn, const char *exc

PL_NH_Debug(PL_NH_DEBUG_TAG, "nextParent NH plugin calling");

uint32_t const NO_RING_USE_POST_REMAP = uint32_t(0) - 1;
Copy link
Contributor

Choose a reason for hiding this comment

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

Constructor-style casts are not Leif-legal but hopefully he won't see it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't write this, this PR is just porting the existing code/changes in core to the plugin
https://github.com/apache/trafficserver/blob/3e8f2eba/proxy/http/remap/NextHopConsistentHash.cc#L235

@rob05c rob05c merged commit d7b1154 into apache:master Jan 31, 2022
zwoop pushed a commit that referenced this pull request Feb 17, 2022
Ports #7925 and #8365 from core strategies to parent_select plugin.

PR #7925 adds go_direct support to peering_ring strategies.
PR #8365 refactors strategy consistent hashing to fix a bug.

They both essentially completely rewrite the strategy consistent
hashing, so it was safer and easier to port them both at the same
time.

Add parent_select plugin autests

Tests are mostly copied from the core strategies tests, which makes
sense since the plugin strategies should behave the same as core.

(cherry picked from commit d7b1154)
@zwoop
Copy link
Contributor

zwoop commented Feb 17, 2022

Cherry-picked to v9.2.x

@zwoop zwoop modified the milestones: 10.0.0, 9.2.0 Feb 17, 2022
moonchen pushed a commit to moonchen/trafficserver that referenced this pull request Mar 17, 2022
* asf/9.2.x:
  Revert "DNS: Fix lack of nameserver failover in low use circumstances. (apache#7843)" (apache#8663)
  Fix strategies to initialize scheme (apache#8650)
  DNS: Fix lack of nameserver failover in low use circumstances. (apache#7843)
  Cleanup strategy debug logs (apache#8656)
  Making 9.2.x backwards compatible with 9.1.x (apache#8661)
  Adds two overridable config variables to control parent mark downs. (apache#8595)
  Fix plugin parent_select missing hostname len (apache#8649)
  Ports apache#7925 apache#8365 core to parent_select plugin (apache#8590)
  Ports apache#7897 from core strategies to parent_select plugin. (apache#8580)
  Adding clangd language server files to .gitignore (apache#8640)
  Make TsSharedMutex.h compile on MacOS. (apache#8645)
  In TsSharedMutex.h, make error reporting thread-safe. (apache#8636)
  Revert "body factory does not respect runroot (apache#8388)" (apache#8654)
  doc: Convert miscased Traffic Server references to |TS| macro (apache#8543)
  Add a new --enable-event-tracker configure option (apache#8179)
  Add parent_select plugin strategy caching (apache#8651)
  TLS Session Resumption: fix timed out session (apache#8667)
  Fix to allow running  from outside top_srcdir (apache#8673)
  Send diags output to stderr when running regression tests. (apache#8662)
  Default proxy.config.http.strict_uri_parsing to "2" (apache#8632)
@zwoop zwoop changed the title Port #7925 and #8365 from core strategies to parent_select plugin Port #7925 and #8365 from core strategies to parent_select plugin May 4, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants