Skip to content

Conversation

@e40pud
Copy link
Contributor

@e40pud e40pud commented Aug 28, 2025

Summary

Part of
Epic: https://github.com/elastic/security-team/issues/12768
Meta: https://github.com/elastic/security-team/issues/13657

In my previous PR, I accidentally removed "retry on conflict" logic.

These changes add a retry logic on bulk update conflicts. For that we use a retry_on_conflict option https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict. The retry count is set to 3 to match previous behaviour.

cc @stephmilovic

@e40pud e40pud added this to the 9.2 milestone Aug 28, 2025
@e40pud e40pud requested a review from stephmilovic August 28, 2025 09:59
@e40pud e40pud self-assigned this Aug 28, 2025
@e40pud e40pud added release_note:skip Skip the PR/issue when compiling release notes Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. labels Aug 28, 2025
@e40pud e40pud requested a review from a team as a code owner August 28, 2025 09:59
@e40pud e40pud added Team:Security Generative AI Security Generative AI backport:version Backport to applied version labels v9.2.0 labels Aug 28, 2025
@elasticmachine
Copy link
Contributor

Pinging @elastic/security-solution (Team: SecuritySolution)

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Metrics [docs]

Saved Objects .kibana field count

Every field in each saved object type adds overhead to Elasticsearch. Kibana needs to keep the total field count below Elasticsearch's default limit of 1000 fields. Only specify field mappings for the fields you wish to search on or query. See https://www.elastic.co/guide/en/kibana/master/saved-objects-service.html#_mappings

id before after diff
_data_stream_timestamp 1 - -1
_doc_count 1 - -1
_ignored_source 1 - -1
_index_mode 1 - -1
_inference_fields 1 - -1
_tier 1 - -1
apm-custom-dashboards 5 - -5
apm-server-schema 2 - -2
apm-service-group 5 - -5
application_usage_daily 2 - -2
config 2 - -2
config-global 2 - -2
coreMigrationVersion 1 - -1
created_at 1 - -1
created_by 1 - -1
entity-definition 9 - -9
entity-discovery-api-key 2 - -2
event_loop_delays_daily 2 - -2
favorites 4 - -4
file 11 - -11
file-upload-usage-collection-telemetry 3 - -3
fileShare 5 - -5
infra-custom-dashboards 4 - -4
infrastructure-monitoring-log-view 2 - -2
intercept_trigger_record 5 - -5
legacy-url-alias 7 - -7
managed 1 - -1
ml-job 6 - -6
ml-module 13 - -13
ml-trained-model 7 - -7
monitoring-telemetry 2 - -2
namespace 1 - -1
namespaces 1 - -1
observability-onboarding-state 2 - -2
originId 1 - -1
product-doc-install-status 7 - -7
references 4 - -4
sample-data-telemetry 3 - -3
security-ai-prompt 8 - -8
slo 11 - -11
space 5 - -5
synthetics-monitor 34 - -34
synthetics-monitor-multi-space 34 - -34
tag 4 - -4
type 1 - -1
typeMigrationVersion 1 - -1
ui-metric 2 - -2
updated_at 1 - -1
updated_by 1 - -1
upgrade-assistant-ml-upgrade-operation 3 - -3
upgrade-assistant-reindex-operation 3 - -3
uptime-synthetics-api-key 2 - -2
url 5 - -5
usage-counters 2 - -2
total -246

History

cc @e40pud

@e40pud e40pud merged commit 8170cff into elastic:main Aug 29, 2025
12 checks passed
ymao1 pushed a commit to ymao1/kibana that referenced this pull request Aug 29, 2025
…date (elastic#233288)

## Summary

Part of
Epic: elastic/security-team#12768
Meta: elastic/security-team#13657

In my [previous PR](elastic#232288), I
accidentally removed "retry on conflict"
[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).

These changes add a retry logic on bulk update conflicts. For that we
use a `retry_on_conflict` option
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.
The retry count is set to 3 to match previous behaviour.

cc @stephmilovic
jkelas pushed a commit to jkelas/kibana that referenced this pull request Sep 2, 2025
…date (elastic#233288)

## Summary

Part of
Epic: elastic/security-team#12768
Meta: elastic/security-team#13657

In my [previous PR](elastic#232288), I
accidentally removed "retry on conflict"
[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).

These changes add a retry logic on bulk update conflicts. For that we
use a `retry_on_conflict` option
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.
The retry count is set to 3 to match previous behaviour.

cc @stephmilovic
@kibanamachine kibanamachine added the backport missing Added to PRs automatically when the are determined to be missing a backport. label Sep 2, 2025
@kibanamachine
Copy link
Contributor

Friendly reminder: Looks like this PR hasn’t been backported yet.
To create automatically backports add a backport:* label or prevent reminders by adding the backport:skip label.
You can also create backports manually by running node scripts/backport --pr 233288 locally
cc: @e40pud

@e40pud e40pud added backport:skip This PR does not require backporting and removed backport missing Added to PRs automatically when the are determined to be missing a backport. backport:version Backport to applied version labels labels Sep 2, 2025
e40pud added a commit to e40pud/kibana that referenced this pull request Sep 12, 2025
…date (elastic#233288)

## Summary

Part of
Epic: elastic/security-team#12768
Meta: elastic/security-team#13657

In my [previous PR](elastic#232288), I
accidentally removed "retry on conflict"
[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).

These changes add a retry logic on bulk update conflicts. For that we
use a `retry_on_conflict` option
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.
The retry count is set to 3 to match previous behaviour.

cc @stephmilovic

(cherry picked from commit 8170cff)

# Conflicts:
#	x-pack/solutions/security/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts
@e40pud
Copy link
Contributor Author

e40pud commented Sep 12, 2025

💚 All backports created successfully

Status Branch Result
9.1
8.19

Note: Successful backport PRs will be merged automatically after passing CI.

Questions ?

Please refer to the Backport tool documentation

e40pud added a commit to e40pud/kibana that referenced this pull request Sep 12, 2025
…date (elastic#233288)

## Summary

Part of
Epic: elastic/security-team#12768
Meta: elastic/security-team#13657

In my [previous PR](elastic#232288), I
accidentally removed "retry on conflict"
[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).

These changes add a retry logic on bulk update conflicts. For that we
use a `retry_on_conflict` option
https://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.
The retry count is set to 3 to match previous behaviour.

cc @stephmilovic

(cherry picked from commit 8170cff)

# Conflicts:
#	x-pack/solutions/security/plugins/elastic_assistant/server/ai_assistant_data_clients/conversations/index.test.ts
e40pud added a commit that referenced this pull request Sep 12, 2025
…ulk update (#233288) (#234867)

# Backport

This will backport the following commits from `main` to `9.1`:
- [[Security Solution][AI Assistant] Handle conflicts during the bulk
update (#233288)](#233288)

<!--- Backport version: 10.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-08-29T15:04:39Z","message":"[Security
Solution][AI Assistant] Handle conflicts during the bulk update
(#233288)\n\n## Summary\n\nPart of\nEpic:
https://github.com/elastic/security-team/issues/12768\nMeta:
https://github.com/elastic/security-team/issues/13657\n\nIn my [previous
PR](#232288), I\naccidentally
removed \"retry on
conflict\"\n[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).\n\nThese
changes add a retry logic on bulk update conflicts. For that we\nuse a
`retry_on_conflict`
option\nhttps://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.\nThe
retry count is set to 3 to match previous behaviour.\n\ncc
@stephmilovic","sha":"8170cff4f95f5dad24f3d40f0b2a84ab083af93e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:
SecuritySolution","Team:Security Generative
AI","v9.2.0"],"title":"[Security Solution][AI Assistant] Handle
conflicts during the bulk
update","number":233288,"url":"https://github.com/elastic/kibana/pull/233288","mergeCommit":{"message":"[Security
Solution][AI Assistant] Handle conflicts during the bulk update
(#233288)\n\n## Summary\n\nPart of\nEpic:
https://github.com/elastic/security-team/issues/12768\nMeta:
https://github.com/elastic/security-team/issues/13657\n\nIn my [previous
PR](#232288), I\naccidentally
removed \"retry on
conflict\"\n[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).\n\nThese
changes add a retry logic on bulk update conflicts. For that we\nuse a
`retry_on_conflict`
option\nhttps://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.\nThe
retry count is set to 3 to match previous behaviour.\n\ncc
@stephmilovic","sha":"8170cff4f95f5dad24f3d40f0b2a84ab083af93e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233288","number":233288,"mergeCommit":{"message":"[Security
Solution][AI Assistant] Handle conflicts during the bulk update
(#233288)\n\n## Summary\n\nPart of\nEpic:
https://github.com/elastic/security-team/issues/12768\nMeta:
https://github.com/elastic/security-team/issues/13657\n\nIn my [previous
PR](#232288), I\naccidentally
removed \"retry on
conflict\"\n[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).\n\nThese
changes add a retry logic on bulk update conflicts. For that we\nuse a
`retry_on_conflict`
option\nhttps://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.\nThe
retry count is set to 3 to match previous behaviour.\n\ncc
@stephmilovic","sha":"8170cff4f95f5dad24f3d40f0b2a84ab083af93e"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
e40pud added a commit that referenced this pull request Sep 12, 2025
…bulk update (#233288) (#234869)

# Backport

This will backport the following commits from `main` to `8.19`:
- [[Security Solution][AI Assistant] Handle conflicts during the bulk
update (#233288)](#233288)

<!--- Backport version: 10.0.2 -->

### Questions ?
Please refer to the [Backport tool
documentation](https://github.com/sorenlouv/backport)

<!--BACKPORT [{"author":{"name":"Ievgen
Sorokopud","email":"[email protected]"},"sourceCommit":{"committedDate":"2025-08-29T15:04:39Z","message":"[Security
Solution][AI Assistant] Handle conflicts during the bulk update
(#233288)\n\n## Summary\n\nPart of\nEpic:
https://github.com/elastic/security-team/issues/12768\nMeta:
https://github.com/elastic/security-team/issues/13657\n\nIn my [previous
PR](#232288), I\naccidentally
removed \"retry on
conflict\"\n[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).\n\nThese
changes add a retry logic on bulk update conflicts. For that we\nuse a
`retry_on_conflict`
option\nhttps://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.\nThe
retry count is set to 3 to match previous behaviour.\n\ncc
@stephmilovic","sha":"8170cff4f95f5dad24f3d40f0b2a84ab083af93e","branchLabelMapping":{"^v9.2.0$":"main","^v(\\d+).(\\d+).\\d+$":"$1.$2"}},"sourcePullRequest":{"labels":["release_note:skip","backport:skip","Team:
SecuritySolution","Team:Security Generative
AI","v9.2.0"],"title":"[Security Solution][AI Assistant] Handle
conflicts during the bulk
update","number":233288,"url":"https://github.com/elastic/kibana/pull/233288","mergeCommit":{"message":"[Security
Solution][AI Assistant] Handle conflicts during the bulk update
(#233288)\n\n## Summary\n\nPart of\nEpic:
https://github.com/elastic/security-team/issues/12768\nMeta:
https://github.com/elastic/security-team/issues/13657\n\nIn my [previous
PR](#232288), I\naccidentally
removed \"retry on
conflict\"\n[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).\n\nThese
changes add a retry logic on bulk update conflicts. For that we\nuse a
`retry_on_conflict`
option\nhttps://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.\nThe
retry count is set to 3 to match previous behaviour.\n\ncc
@stephmilovic","sha":"8170cff4f95f5dad24f3d40f0b2a84ab083af93e"}},"sourceBranch":"main","suggestedTargetBranches":[],"targetPullRequestStates":[{"branch":"main","label":"v9.2.0","branchLabelMappingKey":"^v9.2.0$","isSourceBranch":true,"state":"MERGED","url":"https://github.com/elastic/kibana/pull/233288","number":233288,"mergeCommit":{"message":"[Security
Solution][AI Assistant] Handle conflicts during the bulk update
(#233288)\n\n## Summary\n\nPart of\nEpic:
https://github.com/elastic/security-team/issues/12768\nMeta:
https://github.com/elastic/security-team/issues/13657\n\nIn my [previous
PR](#232288), I\naccidentally
removed \"retry on
conflict\"\n[logic](https://github.com/elastic/kibana/pull/232288/files#r2305375978).\n\nThese
changes add a retry logic on bulk update conflicts. For that we\nuse a
`retry_on_conflict`
option\nhttps://www.elastic.co/docs/api/doc/elasticsearch/operation/operation-bulk#operation-bulk-body-application-json-update-retry_on_conflict.\nThe
retry count is set to 3 to match previous behaviour.\n\ncc
@stephmilovic","sha":"8170cff4f95f5dad24f3d40f0b2a84ab083af93e"}}]}]
BACKPORT-->

---------

Co-authored-by: kibanamachine <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backport:skip This PR does not require backporting release_note:skip Skip the PR/issue when compiling release notes Team:Security Generative AI Security Generative AI Team: SecuritySolution Security Solutions Team working on SIEM, Endpoint, Timeline, Resolver, etc. v8.19.4 v9.1.4 v9.2.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants