opensearch-project/OpenSearch

[BUG] Improper status codes for snapshot executions

Open

#4,687 建立於 2022年10月5日

在 GitHub 查看
 (8 留言) (0 反應) (1 負責人)Java (1,505 fork)batch import
CCIbugdistributed frameworkgood first issuehacktoberfest

倉庫指標

Star
 (8,123 star)
PR 合併指標
 (平均合併 5天 9小時) (30 天內合併 266 個 PR)

描述

Describe the bug A missing S3 bucket for the snapshot results on a 500 its possible that the bucket has been deleted after association.

{
    "error": {
        "root_cause": [
            {
                "type": "repository_exception",
                "reason": "[snapshot-name] could not read repository data from index blob"
            }
        ],
        "type": "repository_exception",
        "reason": "[snapshot-name] could not read repository data from index blob",
        "caused_by": {
            "type": "i_o_exception",
            "reason": "Exception when listing blobs by prefix [index-name]",
            "caused_by": {
                "type": "amazon_s3_exception",
                "reason": "amazon_s3_exception: The specified bucket does not exist (Service: Amazon S3; Status Code: 404; Error Code: NoSuchBucket; Request ID: V3DXMMJXXXXXX; S3 Extended Request ID: D7W3ThAkomdyqtKj0msy1g1Q/qpU0h9XXXXXXXX)"
            }
        }
    },
    "status": 500
}

Then a concurrent snapshot exception is a 503

https://github.com/opensearch-project/OpenSearch/blob/15161a86491569d94642f3a88174e1389218b303/server/src/main/java/org/opensearch/snapshots/ConcurrentSnapshotExecutionException.java#L45-L62

Expected behavior Errors which are client side misconfiguration or client side operations which aren't supported based on the system's concurrency specification should be a 4xx

貢獻者指南