Skip to content
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

Enforce 512 byte document ID limit in bulk updates #8039

Merged
merged 5 commits into from
Jun 15, 2023

Conversation

ankitkala
Copy link
Member

@ankitkala ankitkala commented Jun 13, 2023

Description

Enforce 512 byte document ID limit in bulk updates

Related Issues

Resolves #6595

Check List

  • New functionality includes testing.
    • All tests pass
  • New functionality has been documented.
    • New functionality has javadoc added
  • Commits are signed per the DCO using --signoff
  • Commit changes are listed out in CHANGELOG.md file (See: Changelog)

By 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.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchTaskCancellationWithHighCpu
      1 org.opensearch.cluster.allocation.ClusterRerouteIT.testDelayWithALargeAmountOfShards

@codecov
Copy link

codecov bot commented Jun 13, 2023

Codecov Report

Merging #8039 (e4664e8) into main (bb1f7e2) will decrease coverage by 0.21%.
The diff coverage is 100.00%.

@@             Coverage Diff              @@
##               main    #8039      +/-   ##
============================================
- Coverage     71.00%   70.80%   -0.21%     
+ Complexity    56672    56546     -126     
============================================
  Files          4722     4722              
  Lines        267576   267580       +4     
  Branches      39213    39213              
============================================
- Hits         189995   189455     -540     
- Misses        61593    62144     +551     
+ Partials      15988    15981       -7     
Impacted Files Coverage Δ
...in/java/org/opensearch/action/DocWriteRequest.java 49.31% <100.00%> (+3.72%) ⬆️
...java/org/opensearch/action/index/IndexRequest.java 81.90% <100.00%> (+0.77%) ⬆️
...va/org/opensearch/action/update/UpdateRequest.java 46.89% <100.00%> (+1.10%) ⬆️

... and 458 files with indirect coverage changes

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.search.backpressure.SearchBackpressureIT.testSearchShardTaskCancellationWithHighCpu

Copy link
Member

@andrross andrross left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@dblock @reta We need to make a call here as to the backward compatibility concern. This is (IMO) clearly a bug, but it is a breaking change and will break any workloads that knowingly or not rely on being able to use large IDs in update requests. I'm inclined to backport it because it is a bug and any workloads that break should be aware of their reliance on something that was never intended to be supported.

@reta
Copy link
Collaborator

reta commented Jun 13, 2023

@dblock @reta We need to make a call here as to the backward compatibility concern. This is (IMO) clearly a bug, but it is a breaking change and will break any workloads that knowingly or not rely on being able to use large IDs in update requests. I'm inclined to backport it because it is a bug and any workloads that break should be aware of their reliance on something that was never intended to be supported.

@andrross I tend to agree with you here, it seems like there is an implicit limit (which now becomes explicit), so backporting it would make sense. Also, would be great to update documentation (https://github.com/opensearch-project/documentation-website/)

Signed-off-by: Ankit Kala <[email protected]>
@ankitkala ankitkala changed the title Enforce doc id limit on UpdateRequests as well Enforce 512 byte document ID limit in bulk updates Jun 14, 2023
@ankitkala
Copy link
Member Author

@dblock @reta We need to make a call here as to the backward compatibility concern. This is (IMO) clearly a bug, but it is a breaking change and will break any workloads that knowingly or not rely on being able to use large IDs in update requests. I'm inclined to backport it because it is a bug and any workloads that break should be aware of their reliance on something that was never intended to be supported.

@andrross I tend to agree with you here, it seems like there is an implicit limit (which now becomes explicit), so backporting it would make sense. Also, would be great to update documentation (https://github.com/opensearch-project/documentation-website/)

I'll open an issue to update the documentation after the PR has been merged.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.SegmentReplicationUsingRemoteStoreIT.testDropPrimaryDuringReplication
      1 org.opensearch.remotestore.RemoteStoreRefreshListenerIT.testRemoteRefreshRetryOnFailure

Signed-off-by: Ankit Kala <[email protected]>
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.remotestore.RemoteStoreIT.testPeerRecoveryWithRemoteStoreAndRemoteTranslogRefresh
      1 org.opensearch.index.ShardIndexingPressureIT.testShardIndexingPressureTrackingDuringBulkWrites

Signed-off-by: Andrew Ross <[email protected]>
@andrross andrross added the backport 2.x Backport to 2.x branch label Jun 14, 2023
@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

@andrross
Copy link
Member

I merged in the latest from main, which should fix the test failures. This is ready to go assuming the check passes.

@github-actions
Copy link
Contributor

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.allocation.AwarenessAllocationIT.testThreeZoneOneReplicaWithForceZoneValueAndLoadAwareness

@sachinpkale sachinpkale merged commit 60afeb7 into opensearch-project:main Jun 15, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Jun 15, 2023
* Enforce doc id limit on UpdateRequests as well

Signed-off-by: Ankit Kala <[email protected]>

* PR comments

Signed-off-by: Ankit Kala <[email protected]>

* Address comments 2

Signed-off-by: Ankit Kala <[email protected]>

* Move changelog entry

Signed-off-by: Andrew Ross <[email protected]>

---------

Signed-off-by: Ankit Kala <[email protected]>
Signed-off-by: Andrew Ross <[email protected]>
Co-authored-by: Andrew Ross <[email protected]>
(cherry picked from commit 60afeb7)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
reta pushed a commit that referenced this pull request Jun 15, 2023
* Enforce doc id limit on UpdateRequests as well



* PR comments



* Address comments 2



* Move changelog entry



---------




(cherry picked from commit 60afeb7)

Signed-off-by: Ankit Kala <[email protected]>
Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrew Ross <[email protected]>
gaiksaya pushed a commit to gaiksaya/OpenSearch that referenced this pull request Jun 26, 2023
…t#8039) (opensearch-project#8081)

* Enforce doc id limit on UpdateRequests as well



* PR comments



* Address comments 2



* Move changelog entry



---------




(cherry picked from commit 60afeb7)

Signed-off-by: Ankit Kala <[email protected]>
Signed-off-by: Andrew Ross <[email protected]>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andrew Ross <[email protected]>
imRishN pushed a commit to imRishN/OpenSearch that referenced this pull request Jun 27, 2023
…t#8039)

* Enforce doc id limit on UpdateRequests as well

Signed-off-by: Ankit Kala <[email protected]>

* PR comments

Signed-off-by: Ankit Kala <[email protected]>

* Address comments 2

Signed-off-by: Ankit Kala <[email protected]>

* Move changelog entry

Signed-off-by: Andrew Ross <[email protected]>

---------

Signed-off-by: Ankit Kala <[email protected]>
Signed-off-by: Andrew Ross <[email protected]>
Co-authored-by: Andrew Ross <[email protected]>
Signed-off-by: Rishab Nahata <[email protected]>
shiv0408 pushed a commit to Gaurav614/OpenSearch that referenced this pull request Apr 25, 2024
…t#8039)

* Enforce doc id limit on UpdateRequests as well

Signed-off-by: Ankit Kala <[email protected]>

* PR comments

Signed-off-by: Ankit Kala <[email protected]>

* Address comments 2

Signed-off-by: Ankit Kala <[email protected]>

* Move changelog entry

Signed-off-by: Andrew Ross <[email protected]>

---------

Signed-off-by: Ankit Kala <[email protected]>
Signed-off-by: Andrew Ross <[email protected]>
Co-authored-by: Andrew Ross <[email protected]>
Signed-off-by: Shivansh Arora <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport 2.x Backport to 2.x branch
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] Indexing a document through the bulk api bypasses the 512 byte _id size limit
6 participants