-
Notifications
You must be signed in to change notification settings - Fork 187
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
[Statistics] Remove logged error related to the creation of an existent index #4235
[Statistics] Remove logged error related to the creation of an existent index #4235
Conversation
…creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment)
3800abe
to
9c44be7
Compare
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.
- Code Review: ✔️
- Test: ✔️
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.
…-error-creating-existent-index
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.3-7.16 4.3-7.16
# Navigate to the new working tree
cd .worktrees/backport-4.3-7.16
# Create a new branch
git switch --create backport-4235-to-4.3-7.16
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ad2c9c414acb327bd36573c297a4e04d8e77248e
# Push it to GitHub
git push --set-upstream origin backport-4235-to-4.3-7.16
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.3-7.16 Then, create a pull request where the |
The backport to
To backport manually, run these commands in your terminal: # Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add .worktrees/backport-4.3-1.2-wzd 4.3-1.2-wzd
# Navigate to the new working tree
cd .worktrees/backport-4.3-1.2-wzd
# Create a new branch
git switch --create backport-4235-to-4.3-1.2-wzd
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 ad2c9c414acb327bd36573c297a4e04d8e77248e
# Push it to GitHub
git push --set-upstream origin backport-4235-to-4.3-1.2-wzd
# Go back to the original working tree
cd ../..
# Delete the working tree
git worktree remove .worktrees/backport-4.3-1.2-wzd Then, create a pull request where the |
…nt index (#4235) * fix(statistics): remove the logging when there is an error caused by creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment) * changelog: add the PR entry * changelog: fixes Wazuh version and revision * Update CHANGELOG.md Co-authored-by: Álex <[email protected]>
…nt index (#4235) * fix(statistics): remove the logging when there is an error caused by creating an existent index The statistics jobs run in parallel and they try to create the same index. One of them runs the request to create the index successfully, but the other one fails due to the index already existing. This error is caught and logged. If the error is not related to the index exists, this is thrown and it is caught and logged in another method related to the statistics job More information in: - #4203 (comment) * changelog: add the PR entry * changelog: fixes Wazuh version and revision * Update CHANGELOG.md Co-authored-by: Álex <[email protected]>
|
Description
This PR removes the logging when there is an error checking or creating the index.
If the error is not related to creating an existent index, this is thrown, caught, and logged in another method.
More information in:
The plugin logs, it should look similar to the screenshot when is initiated:
compare to the error seen in:
Closes #4203
Tests
resource_already_exists_exception
when creating the index ofstatistics
job.Requirements:
statistics
job configuration, a new index should be created when the job runs.statistics
job