[Xapian-tickets] [Xapian] #709: Expose Database::get_revision_info()

Xapian nobody at xapian.org
Tue Mar 22 22:09:50 GMT 2016


#709: Expose Database::get_revision_info()
---------------------------+-------------------------------
 Reporter:  Kronuz         |             Owner:  olly
     Type:  enhancement    |            Status:  new
 Priority:  high           |         Milestone:  1.4.x
Component:  Backend-Glass  |           Version:  git master
 Severity:  normal         |        Resolution:
 Keywords:                 |        Blocked By:
 Blocking:                 |  Operating System:  All
---------------------------+-------------------------------

Comment (by olly):

 Simply using ':' to separate isn't really a sensible approach - I'm
 guessing you copied this code from `get_uuid()` but we know a UUID only
 contains hex digits and `-`.  A revision info string is an opaque binary
 blob.

 As things stand, `revision_info` encodings for chert and glass happen to
 encode their own length, so we can actually just concatenate them safely
 without any separator character.

 We could just document that as a requirement.  Alternatives I can see are
 to encode the length externally, or else escape the chosen separator.
 Escaping seems the messiest solution (both to encode and to decode, if we
 later need to unpick a `revision_info` string somewhere).

--
Ticket URL: <https://trac.xapian.org/ticket/709#comment:1>
Xapian <//xapian.org/>
Xapian



More information about the Xapian-tickets mailing list