Opened 15 years ago

Closed 14 years ago

#471 closed enhancement (fixed)

Pass codes not strings for Xapian::Error subclasses in remote protocol

Reported by: Olly Betts Owned by: Olly Betts
Priority: normal Milestone: 1.3.0
Component: Backend-Remote Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All

Description (last modified by Olly Betts)

Currently the remote protocol passes the name of the error subclass in the remote protocol. It would be better overall to assign numeric codes and pass these because:

  • We could have a switch on a compact range of integers in the client, rather than a series of string compares, which should be more compact and faster.
  • Smaller message size, though this isn't a performance sensitive case.

The only downside I see is the small maintenance overhead of having to maintain an enumeration, but it isn't like we add or remove error classes very often at all.

Requires a major remote protocol bump, so milestone:1.3.0 (unless we require a major remote protocol bump for some other reason during 1.2.x).

Change History (1)

comment:1 by Olly Betts, 14 years ago

Description: modified (diff)
Resolution: fixed
Status: newclosed

Fix in trunk r15664.

Note: See TracTickets for help on using tickets.