Closed Bug 591103 Opened 14 years ago Closed 14 years ago

use TTL for history, form history, clients, tabs

Categories

(Firefox :: Sync, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
Tracking Status
blocking2.0 --- betaN+

People

(Reporter: mconnor, Assigned: philikon)

References

Details

(Whiteboard: [has patch][has review][softblocker])

Attachments

(3 files, 3 obsolete files)

probably needs to be exposed as a property for engines, defaulting to never expire.
Probably best to hang this off the type records as they are the ones that know how to JSONify themselves to a WBO (which would include the TTL information).
Blocks: 592375
We haven't officially documented the TTL stuff yet, but as far as I can tell, it's a numeric attribute of the WBO called 'ttl' expressing a UNIX timestamp (seconds) of when the object expires. Absence or a value >= 2100000000 means it lives forever. History entries TTLs should live for 30 days from their last modification. What values do we want for form history and clients/tabs?
blocking2.0: --- → ?
This is needed so quotas don't completely suck.
blocking2.0: ? → beta9+
OS: Mac OS X → All
Hardware: x86 → All
Would this really hold a time-based released? Why can't it wait for the next beta? Moving to betaN
blocking2.0: beta9+ → betaN+
Attached patch Part 0 (v1): Sanitize WBO tests (deleted) — Splinter Review
Make WBO sane and more unit-y: * don't test HTTP auth at the same time * use fetch() method if we're talking over the wire at all * move common HTTP test helper to head file * clean up unnecessary do_throw() calls * use common helpers for test logging
Assignee: nobody → philipp
Status: NEW → ASSIGNED
Attachment #502430 - Flags: review?(mconnor)
Attached patch Part 1 (v1): Add ttl property to WBOs (obsolete) (deleted) — Splinter Review
Add a TTL property to WBOs. If engine record implementations have a 'ttl' attribute, it gets included in the WBO. Add default TTLs: * clients: 7 days * tabs: 7 days * history: 30 days In part 2 (TBD) the client engine will need to make sure to update its server record at least once a week.
Attachment #502431 - Flags: review?(mconnor)
Whiteboard: [has wip]
Attached patch Part 1 (v1.1): Add ttl property to WBOs (obsolete) (deleted) — Splinter Review
Use a TTL of 21 days for client records.
Attachment #502431 - Attachment is obsolete: true
Attachment #502950 - Flags: review?(mconnor)
Attachment #502431 - Flags: review?(mconnor)
The TTL for client records is 21 days so we make sure that we upload a new client record every 7 days.
Attachment #502951 - Flags: review?(mconnor)
Whiteboard: [has wip] → [has patch][needs review mconnor]
Attachment #502430 - Flags: review?(mconnor) → review+
Whiteboard: [has patch][needs review mconnor] → [has patch][needs review mconnor][softblocker]
Comment on attachment 502950 [details] [diff] [review] Part 1 (v1.1): Add ttl property to WBOs > ClientsRec.prototype = { > __proto__: CryptoWrapper.prototype, > _logName: "Record.Clients", >+ // 21 days >+ ttl: 1814400 Error: Magic number detected. 3 additional copies of this error reported. (Please make these consts, since I suspect we'll tune these values at some point.) We'll probably want a crossweave test for this at some point.
Attachment #502950 - Flags: review?(mconnor) → review+
Comment on attachment 502951 [details] [diff] [review] Part 2 (v1): Clients engine needs to periodically upload new record >+ _syncStartup: function _syncStartup() { >+ // Reupload new client record after 7 days. >+ if (Date.now() / 1000 - this.lastRecordUpload > 604800) { another magic number. I thought i raised you better than that.
Attachment #502951 - Flags: review?(mconnor) → review+
Attached patch Part 1 (v1.2): Add ttl property to WBOs (obsolete) (deleted) — Splinter Review
Incorporate review comment: move numbers to consts.
Attachment #502950 - Attachment is obsolete: true
Incorporate review comment: move numbers to consts.
Attachment #503684 - Attachment is obsolete: true
There was IRC talk about having history TTLs of 60 days rather than 30 days. Can we get a decision on this? Other than that this is ready for landing.
Whiteboard: [has patch][needs review mconnor][softblocker] → [has patch][has review][softblocker]
We're going to go with 60 days to start. Ship it!
Backed out from 1.6.x, was not meant to go there: https://hg.mozilla.org/services/fx-sync/rev/e34a3410f235
Blocks: 625684
Component: Firefox Sync: Backend → Sync
Product: Cloud Services → Firefox
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: