#149 closed defect (released)
erroneous flush() call made to read-only remote DB
Reported by: | Mark Hammond | Owned by: | Olly Betts |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Backend-Remote | Version: | SVN trunk |
Severity: | normal | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | #120, #154 | Operating System: | All |
Description
- Start a read-only tcp server on (say) port 8100
- Execute 'python -c "import xapian;xapian.remote_open('localhost', 8100)"
- You will see a message logged at the server:
Got exception NetworkError: Server is read-only
It turns out this is a flush() call being made as the client's 'Database' object is destructing - specifically, the flush is in 'Database::Internal::dtor_called'.
This happens as the database is destructing, so the connection is already being closed. The error doing the flush() is caught and ignored - so as far as I know, this is purely a cosmetic issue (but one that might cause concern)
Change History (6)
comment:1 by , 18 years ago
Blocking: | 120 added |
---|
comment:2 by , 18 years ago
Status: | new → assigned |
---|
comment:3 by , 18 years ago
Blocking: | 154 added; 120 removed |
---|
I think I saw a way to easily fix this (essentially mark transactions as "UNSUPPORTED" for a read-only database, which is true really). So marking this for 1.0.1.
comment:4 by , 18 years ago
Blocking: | 120 added |
---|
On second thoughts, keep blockage on 120 as well as adding 154 as that seems the more logical approach. Sorry for the extra bug spam.
comment:5 by , 18 years ago
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
I've just committed a fix to SVN HEAD.
I've changed this error to be InvalidOperationError, which avoids the worrying message.
The code in dtor_called() still should be sorted out somehow though.