Offline devices recreate online-deleted documents when edited offline.

Đang mở
#9,075 1 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
35/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
javascript

Hướng nghiên cứu

Bắt đầu bằng cách tái hiện kịch bản hai thiết bị với PouchDB 8.0.1 và CouchDB 3.3.3: xóa tài liệu khi trực tuyến, chỉnh sửa tài liệu khi ngoại tuyến, sau đó kết nối lại và quan sát quá trình replication. Theo dõi cách quá trình replication xử lý tài liệu đã bị xóa, số revision của tài liệu và lịch sử bị thiếu; hoàn tất khi tài liệu không được tạo lại và revision của tài liệu không bị đặt lại.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Issue
Offline devices recreate online-deleted documents when edited offline.

Details

Environment: Hybrid app
Platform: All
Adapter: Default
Server: CouchDB

Versions:
Pouch db : 8.0.1
Couch db : 3.3.3

Steps to Reproduce
Two devices are used: one online and one offline. Both have identical local databases (freshly synced).
The online device deletes document A.
The offline device edits the same document (A) and saves it while offline.
Once the offline device goes back online, document A is recreated, even though it was deleted on the online device.
Expected Behavior
The document A should not be recreated when the offline device syncs because it was deleted on the online device. The revision number should not reset.

Question
Shouldn't the replication process ignore a document with a revision number higher than 1 that has no history in the database? What might I be missing here?

Thanks for your help!

Ngôn ngữ chính
JavaScript
Star
17.6k
Fork
1.5k
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của apache/pouchdb

Tất cả issue của apache/pouchdb

Issue tương tự

Thêm issue về JavaScript

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.