fastify / fastify/aws-lambda-fastify

decorateRequest is not thread safe

オープン
#254 コメント 9 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
JavaScript
スター
559
フォーク
37
PR マージ指標
30日以内にマージされた PR はありません

説明

Due to the way the code for `decorateRequest` is written, when multiple requests are executed concurrently the [`currentAwsArguments` cache variable](https://github.com/fastify/aws-lambda-fastify/blob/main/index.js#L22) will clash and overwrite wrong event and context data between the simultaneous requests.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

index.js の22行目付近、decorateRequest が使用する currentAwsArguments キャッシュ変数が定義されている箇所から始めます。並行リクエストを再現し、event データと context データがどのように対応付けられているかを追跡します。完了条件は、同時実行されたリクエストが互いのデータを上書きしなくなることです。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
aws, javascript, node.js
領域
api, backend, cloud
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
42/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。