Ticket #141 (closed enhancement: fixed)

Opened 13 months ago

Last modified 2 months ago

Rebuilding indexes should be done at the en of update iterators

Reported by: faltet Owned by: faltet
Priority: major Component: PyTables Pro
Version: 2.0 Keywords:
Cc:

Description

Right now, when updating indexed columns in situations like:

for row in table:
    row['mycol1'] = XXX
    row['mycol2'] = YYY
    row.update()
table.flush()

the existing indexes are re-computed when the output buffer is full. This is too expensive, and should be enough to just re-index when the update iterator has finished.

Change History

Changed 10 months ago by faltet

  • milestone set to 2.0.3

Changed 10 months ago by faltet

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

Fixed in r3506.

Changed 10 months ago by faltet

  • status changed from closed to reopened
  • resolution deleted

Unfortunately, this exposes a bug in the next test:

tables/tests/test_indexes.py ManyNodesTestCase.test00

Until this is is fixed, I'm disabling this optimization in r3525.

Note that ticket #160 only has sense with this optimization on.

Changed 10 months ago by faltet

  • milestone deleted

Changed 2 months ago by faltet

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

Re-applied r3506 in r3859 (pro-trunk) and r3860 (std-trunk) and it works now. I don't know why it works now, but this is probably due to the recent improvements in node management.

Closing this ticket.

Changed 2 months ago by faltet

  • status changed from closed to reopened
  • resolution deleted

I'm having problems again with the test_indexes.py:ManyNodesTestCase. They appear only on Windows :-/ This should be further investigated.

Changed 2 months ago by faltet

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

Fixed in r3886. The problem was that calling a Table.reIndexDirty() during a kill phase was loading more nodes (related with indexes), and that's always dangerous. Now, the call is only made when manual calls are made (else, a warning is issued).

Note: See TracTickets for help on using tickets.