Concurrent renaming of the same file on the server and client results in duplicate files without conflict detection

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

メンテナーはふだん 1 日以内に返信

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
cpp
領域
desktop

調査の方向性

The payload names no source files or tests, so start by reproducing the rename-on-both-sides scenario from the steps in the issue with a local server and a desktop client, then find where the client's sync engine compares local and remote rename operations. Done means the concurrent rename is either detected and reported as a conflict or the maintainers agree on the intended merge behaviour, and the activity log shows both operations. Expect design discussion before a patch.

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

説明

[DC-410]

Pre-submission Checks
  • I checked for similar issues, but could not find any. I also checked the closed issues. I could not contribute additional information to any existing issue.
  • I will take the time to fill in all the required fields. I know that the bug report may be dismissed otherwise due to lack of information.
Describe the bug

When the same file is renamed independently on the server and the desktop client before the server-side rename has synchronised to the client, both renamed versions appear as separate files after synchronisation completes.

For example:

  1. A file named test19 exists in a synchronised folder on both the server and the local client.
  2. Rename test19 to test30 directly on the server.
  3. Before this change is synchronised to the desktop client, rename the still-existing local file test19 to test31.
  4. Allow synchronisation to complete.

After synchronisation, both test30 and test31 appear as separate files on the server and in the local synchronised folder.
However, these are two different names resulting from renaming the same original file. No conflict is detected or reported, despite both rename operations targeting the same original file.

This behavior also seem to appear because of the delay on server to client synchronization

Expected behavior

Changes made directly on the server should be automatically detected and synchronised to the connected desktop client without requiring manual intervention.

When the same original file is renamed independently on the server and the desktop client before the initial change has synchronised, the client should detect and appropriately handle the conflicting changes.

It should not silently result in two separate files containing identical content without reporting or handling the conflict.

The activity history should also accurately represent the operations performed.

Steps to reproduce the issue
  1. Connect the ownCloud desktop client and the server using the same account.
  2. Ensure that a file named test19 exists in a synchronised folder on both the server and the local client.
  3. Rename test19 to test30 directly on the server through the web interface.
  4. Before the server-side rename is synchronised to the desktop client, rename the still-existing local file test19 to test31 using the local file manager.
  5. Allow the desktop client to complete synchronisation or manually click on "Sync Now" from the desktop client
  6. Check the corresponding folder on the server and the local client.
  7. Observe that both test30 and test31 exist as separate files.
  8. Check the desktop client's activity history.
  9. Observe that only one rename operation is displayed and no conflict is reported.
Screenshots
  1. Both test30 and test31 appear as separate files on the server and in the local synchronised folder.
  2. No conflict is detected or reported.
  3. No conflict copy is created.

https://github.com/user-attachments/assets/0f6dfda4-5249-4c9c-a979-b2652ca2f71e

The activity history on reproducing showed the following details

Image
Logs

No response

Client version number

ownCloud desktop client: 7.2.0.19922-rc.3

Desktop environment (Linux only)

Ubuntu 24.04.5 LTS.

Client package version and origin (Linux only)

Installed Linux app image from https://download.owncloud.com/desktop/ownCloud/testing/7.2.0.19922-rc.3/linux-appimage/

Installation path (Windows only)

No response

Server information

Server: ownCloud Infinite Scale (oCIS)

Server version: 8.2.0+42f7fdcfee2

Web UI: ownCloud Web UI 12.5.0

Server execution: Built from binary and running using ocis/bin/ocis server.

Additional context

Additional observation

Synchronisation behaviour appears to differ depending on the direction of the change:

Test scenario:

  1. Ensure that a file named Test22 exists on both the server and the local client.
  2. Rename Test22 to Test10 on the local client.
  3. Rename Test22 toTest15directly on the server before the client-side change has fully synchronised.
  4. Allow synchronisation to complete.
  5. Check the resulting filename on both the server and the local client.

Observed behavior:

  1. After synchronisation, both the server and the local client contain the file named Test15.

In this scenario, both locations eventually reflect the same filename, and no duplicate files are observed.

https://github.com/user-attachments/assets/1fa4b65d-2400-4042-806c-733deb208754

主要言語
C++
スター
1.5k
フォーク
695
平均マージ
8日 7時間
マージ済み PR(30日)
6

環境構築

はじめの一歩

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

owncloud/client のほかの issue

owncloud/client の issue をすべて見る

似ている issue

C++ の issue をもっと見る

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

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