couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Michael Fair <>
Subject Re: Calculating Revision IDs outside erlang (proposal to add {minor_version, 1} to the calc)
Date Sun, 27 Mar 2016 04:42:58 GMT

1) I have a proposal for how conflicts are handled that I'm typing up
that's straight forward and will alleviate the need for endpoints to
compute the same revision id; it will also enable third party replication
without either side needing to do anything the same way (at the expense of
CPU time during replication when they can't do things the same way).

but 2) I'm happy to provide what I've got so far! :)

Here's a copy/paste of the documents as I've been using to test so far:







Documents that are missing, dedicated null, shortListSmall, shortListLarge,
and obj docs.
There's no reference at all to a long list (i.e. >= 65536) of small
integers.  I only learned about the list of small integers case being
different recently.

One thing to note is that I used the _all_docs?include_docs=true URL to
dump these out of my local 1.6.1 couch and the _all_docs dump provided the
term_to_binary encoded version of the floats, while the front end web GUI
is giving me what you see above.  (I've changed the docs above to use the
float values as I originally saved them and updated the MD5s to be what
they should be under the new code.  Any couch install running OTP 17.0+
should already be producing the same above checksums.)

I'm assuming that the _all_docs thing has something to do with javascript
interpreting/correcting the value of the floats as pulled from the on-disk
representation while _all_docs is just sending out the on-disk
representation from erlang...

During replication I think this would technically break the pure JSON
definition of the float as "a sequence of digits" as it changes the
original sequence of digits provided in the uploaded document.  Case in
point, via _all_docs, I received 3.1415000000000002 instead of the original
3.1415 I uploaded. Not the same issue as this, but something worth noting.

I'd be happy to do a PR for the above tests if someone gave me a template
to work from for the first empty doc (it should just be copy/paste from

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message