Ticket #99 (new defect)

Opened 1 year ago

Last modified 1 year ago

client data can become stale on the server

Reported by: yvesjm Assigned to: yvesjm
Priority: critical Milestone: 0.2.0
Component: agent Version: 0.1.7
Keywords: Cc:

Description

In some situations, (eg if the server deletes its database), the client may not know it must 'sync' again, so the data can become stale.

Or it can only send the 'diff' based on its local cache, which is incomplete after a database wipe in the server.

Possible solution: run cksums on each 'table' of data:

- A) the client "real" data (as read from python-sysinfo) - B) the client current 'local cache' (which normally represents what the client *thinks* the server knows) - C) the data for that client stored in the database by the server

So on every sync, they must be compared based on checksum (possible drawback: more CPU usage)

if C == B == A: do nothing

if ( C == B ) && (C != A): client data changed. send diff of changes

unlikely:

if C != B: "server wiped database?" - full sync

if C, B, A are different - full sync

if B is empty: "wiped or new" - full sync

Change History

01/03/08 21:40:29 changed by yvesjm

  • status changed from new to assigned.
  • component changed from debian_pkg to nwu-agent.

01/03/08 21:47:30 changed by yvesjm

  • priority changed from blocker to critical.

01/04/08 00:46:33 changed by yvesjm

  • status changed from assigned to closed.
  • resolution set to fixed.

(In [379]) trying to fix #99 doing a revamp of the sync process

01/04/08 00:46:48 changed by yvesjm

  • status changed from closed to reopened.
  • resolution deleted.

01/04/08 17:08:40 changed by yvesjm

  • status changed from reopened to new.

Seems to be fixed in [381], but I'd like to write unit tests for this before closing this ticket.

01/04/08 20:12:41 changed by yvesjm

Missing tests for get_changes(), then this ticket is history

01/17/08 15:46:23 changed by yvesjm

  • version set to 0.1.7.
-->