Opened 14 years ago

Last modified 5 years ago

#347 assigned enhancement

Provide public API for replication

Reported by: Olly Betts Owned by: Richard Boulton
Priority: normal Milestone: 1.4.x
Component: Library API Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Blocking: Operating System: All


struct ReplicationInfo should probably be replaced by getter methods of DatabaseMaster and DatabaseReplica (for API consistency with existing classes and to permit other statistics to be added in the future without ABI breakage).

Setting milestone:1.1.1 for now - I'm currently intending to mark replication as "experimental" for 1.1.0.

Change History (10)

comment:1 by Olly Betts, 14 years ago

Component: OtherLibrary API

comment:2 by Richard Boulton, 14 years ago

Owner: changed from Olly Betts to Richard Boulton
Status: newassigned

I've already started work on a patch for this, so assigning to me - it'll probably need some review and replication may well need other changes, so marking it as "experimental" is a good plan anyway.

comment:3 by Olly Betts, 13 years ago


comment:4 by Olly Betts, 13 years ago

Priority: normalhighest

This is really a blocker for releasing with replication, and having to disable that for 1.2.0 would be a shame and probably somewhat fiddly. Also there's a partial patch. Hence setting highest priority.

comment:5 by Olly Betts, 13 years ago


Bumping to 1.1.4.

comment:6 by Richard Boulton, 13 years ago

After some discussion on IRC, we've decided that the replication API isn't ready for a stable release yet. I have several significant concerns about it:

  • the ReplicationInfo struct, as described in this ticket.
  • there's no way to monitor progress of the replication operation through the API
  • the file descriptor used for the replication communication is exposed via the API, which is a potential portability problem, and also simply rather ugly.
  • the API generally offers little control over replication; it's really only designed for the command line scripts to use.

Rather than commit to supporting this API for several years, we'll remove it from the API now. Replication functionality will still be available in the 1.2.0 release via the scripts in bin, which have been tested in production environments and work well.

comment:7 by Richard Boulton, 13 years ago


Replication API removed from public API in r13899 (for the bindings) and r13900 (for xapian-core).

Marking this ticket for the 1.2.x milestone, since a fix will no longer produce an API change.

comment:8 by Olly Betts, 12 years ago

Priority: highestnormal
Summary: Replace struct ReplicationInfo with gettersProvide public API for replication
Type: defectenhancement

comment:9 by Olly Betts, 10 years ago

Milestone: 1.2.x1.3.x

This isn't 1.2.x material now.

comment:10 by Olly Betts, 7 years ago

Milestone: 1.3.x1.4.x

Not a blocker for 1.4.0.

Exposing the fd is potentially an issue on Windows (where sockets are type SOCKET, which is essentially a pointer so may not fit in an int).

If we could just expose it as an opaque handle which fits in an int, we could map internally for such platforms.

Note: See TracTickets for help on using tickets.