[TASK] Refactor: remove the inactive RedirectFilter master redirect
Maintainers usually reply within 2 days
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 55/100
Research direction
First confirm that #3244 is merged, then inspect RedirectFilter.java, RedirectFilterDynamicFeature, ApplicationConfig, GlobalMasterInfo, and GraphTransaction. Run AccessLogFilterTest, including testRedirectRunsAfterBodyCapture, before and after the cleanup. Done means the unused redirect and server-info paths are removed while the listed node-role behavior, REST behavior, and HugeType.SERVER mappings remain.
Written by the indexing model from the issue text.
Description
Background
Follow-up to #3086 / #3244. RedirectFilter forwards requests for endpoints annotated with @RedirectFilter.RedirectMasterRole to the elected master node. It only acts when GlobalMasterInfo.supportElection() is true:
The only code that set it to true was GraphManager.initRoleStateMachine(), which nothing has called since #3082. #3244 deletes that method together with the rest of the role election code, so no code path can enable the flag. The filter is still registered on the 21 schema, job, task and raft endpoint methods that carry the annotation and returns early on every request.
GraphTransaction.queryServerInfos(...) is in the same state. It read the ~server vertices that HugeServerInfo used to write, and it has no callers.
Scope
- Delete
RedirectFilter,RedirectFilterDynamicFeature, theRedirectMasterRoleannotation on the endpoints that use it, and the registration inApplicationConfig. DropAccessLogFilterTest.testRedirectRunsAfterBodyCapture. - Remove
supportElection,masterInfo(...),resetMasterInfo(),NodeInfoand the stale "delete the startup of master-worker" TODO fromGlobalMasterInfo. Keep the node id and node role parts, whichServerInfoManagerandGraphManagerstill use. - Delete both
GraphTransaction.queryServerInfos(...)overloads.
Constraints
- No REST behavior changes, since the redirect never runs today. The
x-hg-redirectheader would simply stop being recognised. - Keep
HugeType.SERVERand the~server/~role_datalabel mapping inHugeVertex, because graphs written by older versions may still hold those vertices. - Depends on #3244 being merged first.
- Dominant language
- Java
- Stars
- 3.2k
- Forks
- 637
- Avg merge
- 3d 21h
- Merged PRs (30d)
- 21
Getting set up
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/hugegraph
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
apache/hugegraph#3231 · 1 comment ·
Maintainers usually reply within 2 days
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 64/100
apache/hugegraph#3142 · 7 comments ·
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 15/100
Maintainers usually reply within 2 days
-
Difficulty 4/5 3-5 days Newbie friendliness 35/100
Maintainers usually reply within 2 days
-
Difficulty 5/5 Over a week Newbie friendliness 30/100
apache/hugegraph#3238 · 2 comments ·
Maintainers usually reply within 2 days
All issues in apache/hugegraph
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
redhat-developer/intellij-quarkus#1626 ·
-
Type/Bug
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
wso2/product-integrator-mi#5061 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
quarkiverse/quarkus-roq#1277 ·
Maintainers usually reply within 1 day
-
Typos in page footerOpen
Difficulty 1/5 Under an hour Newbie friendliness 90/100
apache/logging-site#48 ·
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/maven-surefire#3496 · 3 comments ·
Maintainers usually reply within 1 day