-
-
Notifications
You must be signed in to change notification settings - Fork 487
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
CSW Harvester: Inconsistent and Incorrect Metrics under certain conditions #8039
Comments
josegar74
added a commit
to GeoCat/core-geonetwork
that referenced
this issue
May 19, 2024
…rtain conditions. Retrieve metadata method increments metrics under certain conditions and returns null. Methods calling the retrieve metadata method increments additionally the unretrievable metric if null is returned. Sonarlint fixeas are already applied. Fixes geonetwork#8039
10 tasks
geonetworkbuild
pushed a commit
that referenced
this issue
Sep 5, 2024
…rtain conditions. Retrieve metadata method increments metrics under certain conditions and returns null. Methods calling the retrieve metadata method increments additionally the unretrievable metric if null is returned. Sonarlint fixeas are already applied. Fixes #8039
josegar74
added a commit
that referenced
this issue
Sep 5, 2024
…le metadata in certain conditions (#8352) * CSW Harvester / Avoid increment 2 metrics for a single metadata in certain conditions. Retrieve metadata method increments metrics under certain conditions and returns null. Methods calling the retrieve metadata method increments additionally the unretrievable metric if null is returned. Sonarlint fixeas are already applied. Fixes #8039 * CSW Harvester / Use primitive boolean for 'force' parameter --------- Co-authored-by: Jose García <josegar74@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
The CSW harvester of the geonetwork sometimes increments two metrics for a single record. This is not desired and does not happen in other harvesters AFAICT.
This can happen if a new or existing record cannot be retrived, validated or is a duplicate. In both
addMetadata
andupdatingLocalMetadata
, the functionretriveMetadata
is called.core-geonetwork/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/csw/Aligner.java
Line 504 in a79641b
This function increments one of the metrics and returns
null
if retrival or validation fails or if the record is a duplicate.The error is that the calling functions also increment either
unretrievable
in case of new metadata orunchanged
in case of updating existing metadata whennull
is returned, which causes the erronious behavior:core-geonetwork/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/csw/Aligner.java
Lines 280 to 290 in a79641b
core-geonetwork/harvesters/src/main/java/org/fao/geonet/kernel/harvest/harvester/csw/Aligner.java
Lines 441 to 447 in a79641b
The solution seems to just not increment any counter if
retriveMetadata
returnnull
To Reproduce
Steps to reproduce the behavior:
Expected behavior
A single record only increments the number of total records and one of the other status metrics.
Screenshots
The count of all other metrics besides total combined in this screenshot is 2969, which is 4 entries more than should be possible
Desktop (please complete the following information):
Additional context
This bug makes the metrics way less useful, as you cannot say for certain what errors occured and what is just a byproduct of the current behaviour, which makes automated monitoring of these metrics impossible.
The text was updated successfully, but these errors were encountered: