Ticket #145 (assigned enhancement)
remote connection should pass 'writable' flag
| Reported by: | mhammond | Owned by: | olly |
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.0 |
| Component: | Backend-Remote | Version: | SVN trunk |
| Severity: | minor | Keywords: | |
| Cc: | richard | Blocked By: | |
| Operating System: | All | Blocking: |
Description (last modified by richard) (diff)
When a client application uses (say) xapian.remote_open() to connect to a server running in 'writable' mode, the server still opens the database for the connection in 'writable' mode, even though this was not requested by the caller.
This limitation means that an application might need to use 2 servers - one for
writable and one for read-only - as usage of the writable server will lock out all other read-only requests, which would be unacceptable in some environments.
The fix is not trivial as the protocol doesn't provide a way of providing connection-specific options. A solution would be to have the client send a MSG_KNOCK (?) message at connection with options (just this flag in the first instance) and the server could respond with its REPLY_GREETING if all is well. I understand this isn't going to make 1.0 though (well, unless you are really keen and would accept a patch if I could make one :)
