Skip to content

Comments

Purge remote translog basis the latest metadata for remote-backed indexes#6086

Merged
gbbafna merged 16 commits intoopensearch-project:mainfrom
ashking94:tx-safe-remote-delete
Feb 3, 2023
Merged

Purge remote translog basis the latest metadata for remote-backed indexes#6086
gbbafna merged 16 commits intoopensearch-project:mainfrom
ashking94:tx-safe-remote-delete

Conversation

@ashking94
Copy link
Member

@ashking94 ashking94 commented Jan 30, 2023

Description

During failover or relocation of primary shard, during initialisation of RemoteFsTranslog, we read remote translog metadata and download translog and checkpoint file for the corresponding primary term and generation as present in remote translog metadata file. After a flush, we clear *.tlog and *.ckp files, but the remote metadata file continues to hold references to the deleted generations. We need to handle the same.

We should delete remote translog considering the latest metadata file uploaded. The tlog/ckp files referenced by that metadata file should not be deleted . By doing this we will be able to restore translog from that metadata.

Issues Resolved

#5845

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.

@ashking94 ashking94 added Storage:Durability Issues and PRs related to the durability framework skip-changelog v2.6.0 'Issues and PRs related to version v2.6.0' labels Jan 30, 2023
@ashking94 ashking94 marked this pull request as ready for review January 30, 2023 17:46
@ashking94 ashking94 changed the title Purge translog basis the latest metadata for remote-backed indexes Purge remote translog basis the latest metadata for remote-backed indexes Jan 30, 2023
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
@ashking94 ashking94 force-pushed the tx-safe-remote-delete branch from 9d30ec8 to b5c0f7f Compare February 1, 2023 11:23
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

Gradle Check (Jenkins) Run Completed with:

  • RESULT: UNSTABLE ❕
  • TEST FAILURES:
      1 org.opensearch.cluster.routing.allocation.decider.DiskThresholdDeciderIT.testIndexCreateBlockIsRemovedWhenAnyNodesNotExceedHighWatermark

Signed-off-by: Ashish Singh <ssashish@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

Gradle Check (Jenkins) Run Completed with:

@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

Gradle Check (Jenkins) Run Completed with:

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

Gradle Check (Jenkins) Run Completed with:

@gbbafna
Copy link
Contributor

gbbafna commented Feb 2, 2023

Build failed due to

> Task :modules:ingest-common:jarHell FAILED
| Output for C:\hostedtoolcache\windows\Java_Adopt_jdk\11.0.18-10\x64\bin\java.exe:#
# There is insufficient memory for the Java Runtime Environment to continue.
# Native memory allocation (malloc) failed to allocate 57616 bytes for Chunk::new
# An error report file with more information is saved as:
# D:\a\OpenSearch\OpenSearch\modules\ingest-common\hs_err_pid6884.log

Signed-off-by: Ashish Singh <ssashish@amazon.com>
@github-actions
Copy link
Contributor

github-actions bot commented Feb 2, 2023

Gradle Check (Jenkins) Run Completed with:

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

@ashking94
Copy link
Member Author

Build succeeded. @gbbafna

@gbbafna gbbafna merged commit 54ce423 into opensearch-project:main Feb 3, 2023
@gbbafna gbbafna added the backport 2.x Backport to 2.x branch label Feb 3, 2023
opensearch-trigger-bot bot pushed a commit that referenced this pull request Feb 3, 2023
…exes (#6086)

* Deleting remote translog considering latest remote metadata

Co-authored-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
(cherry picked from commit 54ce423)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
ashking94 pushed a commit to ashking94/OpenSearch that referenced this pull request Feb 6, 2023
…exes (opensearch-project#6086)

* Deleting remote translog considering latest remote metadata

Co-authored-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
(cherry picked from commit 54ce423)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
gbbafna added a commit that referenced this pull request Feb 6, 2023
…exes (#6170)

* Purge remote translog basis the latest metadata for remote-backed indexes (#6086)

Co-authored-by: Gaurav Bafna <gbbafna@amazon.com>
Signed-off-by: Ashish Singh <ssashish@amazon.com>
(cherry picked from commit 54ce423)
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 skip-changelog Storage:Durability Issues and PRs related to the durability framework v2.6.0 'Issues and PRs related to version v2.6.0'

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants