-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
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
perf: cannot be accessed for a long time during startup #3300
Conversation
9f3f1dc
to
fad2b0a
Compare
测试发现,页面的路由修改别名之后,以前的路径也可以访问,比如:
修改之后两个链接都可以访问。 |
已修复 |
@guqing 需要解决一下冲突。 |
# Conflicts: # src/main/java/run/halo/app/core/extension/reconciler/TagReconciler.java # src/test/java/run/halo/app/core/extension/reconciler/TagReconcilerTest.java
Done |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
经过手动测试,暂时发现一个问题:
- 文章路由设置为
/?p={name}
- 访问文章列表,得到的文章链接是正确的
- 但都指向第一篇文章
已修复 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/approve
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
目前,我在测试当前 PR 的时候,发现一个小问题(可能和当前 PR 无关):修改“分类和标签的路由前缀”后,主题端对应的分类和标签链接渲染并没有正确变更,导致无法正常访问。
这是由于主题端渲染的链接来自 status.permalink 而 status.permalink 路由规则改了后需要 reconciler 一个个去运行后才能更新为正确的数据 |
src/main/java/run/halo/app/core/extension/reconciler/TagReconciler.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
Codecov Report
@@ Coverage Diff @@
## main #3300 +/- ##
============================================
- Coverage 60.99% 59.98% -1.02%
+ Complexity 2490 2376 -114
============================================
Files 399 388 -11
Lines 12664 12268 -396
Branches 1043 985 -58
============================================
- Hits 7725 7359 -366
- Misses 4431 4437 +6
+ Partials 508 472 -36
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: JohnNiang, ruibaby The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
#### What type of PR is this? /kind bug /area core /milestone 2.3.x #### What this PR does / why we need it: 修复文章列表分页配置取值错误的问题 此问题为 #3300 PR 引入,由于改动较大遗漏了这点没测试到。 how to test it? 修改文章设置中的大小,查看主题端分页是否符合预期: 包括首页,归档页,标签文章页,分类文章页。 <img width="575" alt="image" src="https://user-images.githubusercontent.com/38999863/221574440-eeec9c27-57ab-46d1-823f-7cc076fb2b54.png"> #### Which issue(s) this PR fixes: Fixes #3411 #### Special notes for your reviewer: /cc @halo-dev/sig-halo #### Does this PR introduce a user-facing change? ```release-note None ```
#### What type of PR is this? /kind bug /area core /milestone 2.3.x #### What this PR does / why we need it: 修复文章和自定义页面缺失 name 模型属性导致的访问量无法计数问题 此为 2.3.0 引入的问题 see #3300 how to test it? 1. 切换文章的路由为不带 name 的规则 2. 访问文章看 `/apis/api.halo.run/v1alpha1/trackers/counter` API 是否有如下参数,且 name 值正确 ```json { "group": "content.halo.run", "plural": "posts", "name": "335", "hostname": "localhost", "screen": "1920x1080", "language": "zh-CN", "url": "/?p=halo-150-released", "referrer": "http://localhost:8090/?p=how-to-development-a-halo-plugin" } ``` 3. 观察文章访问量是否有增加 4. 重复上述 2、3 步骤检查自定义页面的访问量功能是否正确 #### Which issue(s) this PR fixes: Fixes #3448 #### Does this PR introduce a user-facing change? ```release-note 修复文章和自定义页面缺失属性导致的访问量无法计数问题 ```
What type of PR is this?
/kind improvement
/area core
/milestone 2.3.x
What this PR does / why we need it:
能通过注册 pattern 作为路由的就直接注册 pattern 以避免 Reconciler 还没结束而无法注册路由导致的访问问题。
content.halo.run/permalink-pattern: some-pattern
,当系统设置中路由规则改变时会刷一遍这些资源的content.halo.run/permalink-pattern
annotation。Which issue(s) this PR fixes:
Fixes #3254
Special notes for your reviewer:
how to test it?
/cc @halo-dev/sig-halo
Does this PR introduce a user-facing change?