[Xapian-tickets] [Xapian] #504: Add is_closed() to Database class
Xapian
nobody at xapian.org
Tue Aug 24 08:38:29 BST 2010
#504: Add is_closed() to Database class
-------------------------+--------------------------------------------------
Reporter: jcassee | Owner: olly
Type: enhancement | Status: new
Priority: normal | Milestone:
Component: Library API | Version:
Severity: minor | Keywords:
Blockedby: | Platform: All
Blocking: |
-------------------------+--------------------------------------------------
Changes (by olly):
* component: Other => Library API
Comment:
Um, ''"dire words"''?
The issue here is that we want to allow API methods to efficiently cache
data. So after you close a database, either an operation fails with an
exception (which you can catch and deal with), or it returns the correct
result because it is using data fetched from the database before it was
closed.
The alternative is to gate every single API method which involves use of a
Database in any way (which is most of them) with a check if the Database
has been closed, and if it has then force it to fail. That's a lot of
extra work for no clear benefit.
Can you explain how you read the documentation here? It makes sense to
me, but we ought to fix it if it can mislead.
Since there are no dire consequences, I'm undecided if this is a useful
method to add. It's not too hard to do, but there are various costs to
adding more methods.
--
Ticket URL: <http://trac.xapian.org/ticket/504#comment:1>
Xapian <http://xapian.org/>
Xapian
More information about the Xapian-tickets
mailing list