-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Display all file cache metrics in NodeStats and use the correct human-readable field name #13232
base: main
Are you sure you want to change the base?
Display all file cache metrics in NodeStats and use the correct human-readable field name #13232
Conversation
This PR will need backport 2.x as well. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #13232 +/- ##
============================================
+ Coverage 71.69% 71.73% +0.03%
+ Complexity 62385 62346 -39
============================================
Files 5148 5148
Lines 293301 293321 +20
Branches 42383 42389 +6
============================================
+ Hits 210285 210405 +120
+ Misses 65607 65561 -46
+ Partials 17409 17355 -54 ☔ View full report in Codecov by Sentry. |
48b11ef
to
db1486a
Compare
❌ Gradle check result for 48b11ef: Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for db1486a: Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
@reta I think you are right. Let me push update... |
a431ec3
to
9603f47
Compare
❌ Gradle check result for 9603f47: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
❌ Gradle check result for 10cb157: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
10cb157
to
9603f47
Compare
@reta FYI: There is a bug... I need to find it. |
❌ Gradle check result for 9603f47: FAILURE Please examine the workflow log, locate, and copy-paste the failure(s) below, then iterate to green. Is the failure a flaky test unrelated to your change? |
Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Addming missing tests for file caches in NodeStats FsInfo. This commit changes the test value for `cache_utilized` field. Going forward both file cache fields are present in the node stats REST response. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
In FsInfo.Path object the value of fileCacheUtilized is now initialized like any other fields, that means it is -1, which means the value hasn't been populated yet. To make this possible it was necessary to fix FsProbeTest and use a real FileCache object to enable internal logic to handle initialization and safeguarding of the value properly. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Use String concatenation instead of StringBuilder. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Adding a second public ctor for FsInfo.Path (to be used in tests only). Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Add FsInfo.Path ctor asserts. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
Deprecating `FsInfo.Path#getFSInfo(NodePath nodePath)` method because without FileCache instance it produces incomplete Path object that does not have initialized some file cache related variables. WIP: We still need better tests running multinode cluster with FileCache. Signed-off-by: Lukáš Vlček <lukas.vlcek@aiven.io>
75e04e4
to
4466d34
Compare
@lukas-vlcek Would you be interested in taking the API spec for these fields too? This is opensearch-project/opensearch-api-specification#156 - I started https://github.com/dblock/opensearch-api-specification/tree/nodes-stats but there's a lot of internal knowledge of what these fields are that I will take forever to dig up :( |
@dblock I would love to... but I am currently at 🌴 🚴♂️ ☀️ I will be back in 2 weeks. |
This PR is stalled because it has been open for 30 days with no activity. |
Description
I think this is a copy&paste issue from previous
fileCacheReserved
test?Also the order of parameters in
builder.humanReadableField()
should be different.Question 1): Do we need CHANGELOG record for this PR? (I think we do, because this is a bugfix, right?)Question 2): Why we display
cache_utilized
field only if its value!= 0
? The point is that if you want to design a client handling nodes stats response then you may not be even aware that such field exists (how can you learn it does exist if documentation is incomplete?). Can't we just print this field even if the value is0
? (See example below)Similarly we can ask why we do not want to print
cache_reserved_in_bytes
if!=-1
?Sounds like the idea is that if these two fields have the default value we do not want to print them. Can I ask why? (Yes,
-1
is not ideal default value).Related Issues
Introduced in #6350
Back-ported in #6485
Check List
[ ] New functionality includes testing.[ ] New functionality has been documented.[ ] New functionality has javadoc added[ ] Public documentation issue/PR createdBy submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.