Closed Bug 735085 Opened 12 years ago Closed 10 years ago

prevent overlapping writes to same user/collection by different clients

Categories

(Cloud Services Graveyard :: Server: Sync, defect, P2)

x86_64
Linux
defect

Tracking

(Not tracked)

VERIFIED FIXED

People

(Reporter: rfkelly, Unassigned)

References

Details

(Whiteboard: [qa-])

Use a database-level lock to prevent this, per conversation with atoll
This is the situation we're trying to avoid.  atoll, please correct if I misunderstand.

Client 1 uploads 100 records.  They get assigned timestamp1, and start being written to the database.  This is a big batch so it doesn't complete yet.

Client 2 uploads 1 record.  It gets assigned timestamp2 > timestamp1.  Because it's a small batch, they get written to the database before the above transaction completes.

Client 2's write completes,  it is told that X-Timestamp = timestamp2.

Client 1's write completes, it is told that X-Timestamp = timestamp1.

Problem: Client 2 will never retrieve the records uploaded by Client 1.

Potential Solution: lock something in the database that is unique to this userid/collectionid, so that the writes do not overlap.

Complication: This lock would need to be taken *before* assigning timestamps to the items, and *before* verifying that the write can proceed without conflict.
Whiteboard: [qa-]
Depends on: 739845
Blocks: 784598
Priority: -- → P2
This is done in sync1.5 with the new "session" objects, and will not be fixed for the going-away-real-soon-now sync1.1 codebase.
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
OK.
Status: RESOLVED → VERIFIED
Product: Cloud Services → Cloud Services Graveyard
You need to log in before you can comment on or make changes to this bug.