opensearch-project / opensearch-project/custom-codecs

[BUG] QAT specific settings should only applicable for QAT codecs only.

Open
#170 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Java
Stars
14
Forks
29
Avg merge
3h 38m
Merged PRs (30d)
7

Description

What is the bug?

In the current implementation, the index.codec.qatmode is introduced but it does not validate if the setting can be applied to all codecs or not. Ideally, this setting should be applied only for QAT codecs.

How can one reproduce the bug?

Request:

curl --location --request PUT 'http://localhost:9200/index-10045' \
--header 'Content-Type: application/json' \
--data-raw '{
  "settings": {
    "index": {
      "codec": "zstd",
      "codec.qatmode": "auto"
    }
  }
}'

Response:

{
    "acknowledged": true,
    "shards_acknowledged": true,
    "index": "index-10045"
}
What is the expected behavior?

QAT specific settings should only be applied for QAT codecs

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in src/main/java/org/opensearch/index/codec/customcodecs/Lucene99QatCodec.java at the index.codec.qatmode setting, then reproduce the issue with the provided curl request using the zstd codec. Trace how codec settings are validated and make the QAT-specific setting apply only to QAT codecs; done means the non-QAT case no longer accepts or applies it.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
backend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.