Drop doc['ver'] from required schema

Bug #1029190 reported by Jason Gerard DeRose
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Dmedia
Fix Released
High
Jason Gerard DeRose

Bug Description

As we approach production-ready, I've been looking over the schema with a critical eye for stuff that isn't actually being used.

For one, we want the critical schema that drives the automation behaviors to be just what's actually used, because we don't want to make long-term commitments to schema that we don't need. Testing and review are also easier when we only use essential schema.

For another, the dmedia/file docs will get updated quite often, and so the smaller we can make them, the less of an issue the CouchDB append-only database files will be.

doc['ver'] seemed like a good idea back in the day as a way to make each document identify its schema version. But now we have versioned databases instead, and upgrading the schema a database at a time is what makes sense. It's non-destructive, and it provides the flexibility needed for arbitrary schema upgrades.

So I'm removing doc['ver']. If we need it in the future, we can treat a missing doc['ver'] as version zero, and use {'ver': 1} for version 1, and so on.

Related branches

Revision history for this message
Jason Gerard DeRose (jderose) wrote :

One note on the document size, to to point out how much of a reduction is possible: in some tests with real Dmedia documents with our current schema, I got the serialized document size down to less than have the current size by reducing things to only the truly essential schema.

Changed in dmedia:
status: In Progress → Fix Committed
Changed in dmedia:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.