Omitting `_key` hangs `_BatchWriter`
評価
調査の方向性
提供された reprex.py をテスト store に対して実行し、その後 store.create_writer() を _BatchWriter の実装まで追跡します。_key の有無による書き込みの動作を比較します。_key を省略したレコードに対して writer.flush() が完了し、既存の成功するケースも引き続き動作すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Failing
# reprex.py
import os
import scrapinghub
store = (
scrapinghub.ScrapinghubClient(os.getenv('SH_APIKEY'))
.get_project(1234567890)
.collections.get_store("ok_to_mess_around_with")
)
writer = store.create_writer()
writer.write({"foo": "bar"})
print("write")
writer.write({"fizz": "buzz"})
print("write")
writer.flush()
print("flush")
python reprex.py
write
write
^CTraceback (most recent call last):
...
KeyboardInterrupt
Passing
import os
import scrapinghub
store = (
scrapinghub.ScrapinghubClient(os.getenv('SH_APIKEY'))
.get_project(1234567890)
.collections.get_store("ok_to_mess_around_with")
)
writer = store.create_writer()
writer.write({"_key": "foo", "foo": "bar"})
print("write")
writer.write({"_key": "fizz", "fizz": "buzz"})
print("write")
writer.flush()
print("flush")
python reprex.py
write
write
flush
- 主要言語
- Python
- スター
- 204
- フォーク
- 62
- 平均マージ
- 6分
- マージ済み PR(30日)
- 2
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
scrapinghub/python-scrapinghub のほかの issue
-
Incorrect information for Samples in Job documentation対応中かも @AdrianAtZyte が 66 日前に担当しました。 オープン
難易度 1/5 1時間未満 初心者へのやさしさ 72/100
-
Zyte Job API: Provision to support Cron Expression or Time Interval対応中かも @AdrianAtZyte が 67 日前に担当しました。 オープン
難易度 5/5 1週間以上 初心者へのやさしさ 25/100
-
Add async support再び着手できるかも @VMRuiz が 1414 日前に担当しましたが、オープン中のプルリクエストはありません。 オープン
scrapinghub/python-scrapinghub#169 · コメント 8 件 · リアクション 2 件 · 担当者 4 名 ·
-
Add retry logic to Job Tag Update function対応中かも @AdrianAtZyte が 66 日前に担当しました。 オープン
難易度 3/5 1〜2日 初心者へのやさしさ 42/100
-
KeyError: 'status' when trying to schedule spider対応中かも @AdrianAtZyte が 64 日前に担当しました。 オープンenhancement
難易度 3/5 1〜2日 初心者へのやさしさ 30/100
scrapinghub/python-scrapinghub#156 · コメント 6 件 ·
scrapinghub/python-scrapinghub の issue をすべて見る
似ている issue
-
[19.0] pos_sale: settling an order with a 0 down payment line crashes (reading 'reward_id') and leaves a wrong amount due対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープン
難易度 2/5 1〜3時間 初心者へのやさしさ 79/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1時間未満 初心者へのやさしさ 79/100
developmentseed/titiler-covjson#164 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
awslabs/visual-asset-management-system#2164 ·
メンテナーはふだん 1 日以内に返信
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
MakazhanAlpamys/Soup#3589 ·
メンテナーはふだん 1 日以内に返信
-
channels status reports the wrong Enabled value for Feishu instances and default-enabled WebSocketオープン
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
メンテナーはふだん 1 日以内に返信