Ticket #149 (closed defect: released)

Opened 20 months ago

Last modified 19 months ago

erroneous flush() call made to read-only remote DB

Reported by: mhammond Owned by: olly
Priority: normal Milestone:
Component: Backend-Remote Version: SVN trunk
Severity: normal Keywords:
Cc: Blocked By:
Operating System: All Blocking: #120, #154

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

Changed 20 months ago by mhammond

  • blocking set to 120

Changed 20 months ago by olly

  • status changed from new to assigned

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.

Changed 20 months ago by olly

  • blocking changed from 120 to 154

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.

Changed 20 months ago by olly

  • blocking changed from 154 to 120, 154

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.

Changed 20 months ago by olly

  • status changed from assigned to closed
  • resolution set to fixed

I've just committed a fix to SVN HEAD.

Changed 19 months ago by olly

  • resolution changed from fixed to released

Fixed in 1.0.1.

Changed 19 months ago by trac

  • platform set to All
Note: See TracTickets for help on using tickets.