Is SSH.Net safe for 2 competitive cross process (not threads) concurrent access.

オープン
#1,046 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
csharp
領域
networking

調査の方向性

SftpClient.RenameFile と AutoResetEvent を使用する SSH.NET のソースコードから始めてください。別々のプロセスまたは Kubernetes ポッドからの同時リネームを再現し、観測された上書き動作が想定されたものかどうかを判断したうえで、明確な結果とともに文書化するか対処してください。

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

説明

Issue case:

  • upload 2 or more files to SFTP (e.g. file-1.txt & file-2.txt)
  • try to rename them simultaneously to the same name (e.g. file-3.txt) -- SftpClient.RenameFile
  • renaming should be done from different processes (e.g. from 2 different K8S pods)

Result:

  • expectation—there should be error, - like 'the file with the same name already exist' for some of pods (the last one)
  • actual result - time to time, both file successfully renamed in sequence, and the first file will override by last one

I believe that the root cause is that ssh.net is leveraging 'AutoResetEvent' for synchronization base on source code.
But, as I know AutoResetEvent cannot be used for interprocess synchronization

The question:
Am I right with my clue, or I'm just using ssh.net not in the right way ?

主要言語
C#
スター
4.4k
フォーク
993
平均マージ
9日 21時間
マージ済み PR(30日)
1

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

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

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

sshnet/SSH.NET のほかの issue

sshnet/SSH.NET の issue をすべて見る

似ている issue

C# の issue をもっと見る

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

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