Empty accelerated fields leads to TypeError
@Ickerday がすでに取り組んでいます。
2025年11月13日 から。
評価
この issue はまだ評価されていません。
説明
Describe the bug
def __getitem__(self, item):
res = Collection.__getitem__(self, item)
for k, v in res.content.items():
if "accelerated_fields" in k:
res.content[k] = json.loads(v)
return res
This code breaks if v is not a valid JSON string.
As there is no way to remove an acceleration other than setting it to empty, this is a typical case.
To Reproduce
Steps to reproduce the behaviour:
c.kvstore.create("test")
collection = c.kvstore["test"]
collection.update_accelerated_field("test", {"test": 1})
collection = c.kvstore["test"]
collection.update_accelerated_field("test", "")
collection = c.kvstore["test"]
Expected behaviour
Rather than an exception, the empty string is used as the value.
If I am allowed to dream, splunkd should provide a mechanism to remove accelerations and field configurations cleanly. However, this bug should still be fixed, as we never know what administrators might write in .conf files.
- 主要言語
- Python
- スター
- 743
- フォーク
- 387
- 平均マージ
- 42分
- マージ済み PR(30日)
- 4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
splunk/splunk-sdk-python のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
splunk/splunk-sdk-python#835 · コメント 1 件 · リアクション 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 74/100
splunk/splunk-sdk-python#831 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
splunk/splunk-sdk-python#704 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 30/100
splunk/splunk-sdk-python#840 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 74/100
splunk/splunk-sdk-python#828 ·
splunk/splunk-sdk-python の issue をすべて見る
似ている issue
-
documentation help wanted
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 90/100
simonw/sqlite-utils#872 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100