#4843 ensure_index should create indexes before dropping indexes

v1.0.0
closed
General
Cory Johns
2015-08-20
2012-08-31
No

If changing an index from (a,b) to (a,b,c) for example, it is important that the new index is created before the old index is dropped. Otherwise, while the index is being created, queries for (a) or (a,b) will not have an index to use. This is even more critical if an index creation fails for some reason, and the database is left without the index until a fix might be developed.

Discussion

  • Dave Brondsema

    Dave Brondsema - 2012-08-31

    forge:db/4843

    I added a test for this command since there wasn't one before, but I couldn't think of an effective way to mock the ensure/drop index calls and validate the order in which they were called.

     
  • Dave Brondsema

    Dave Brondsema - 2012-08-31
    • status: in-progress --> code-review
    • qa: Cory Johns
     
  • Cory Johns - 2012-09-04
    • status: code-review --> open
     
  • Cory Johns - 2012-09-04

    Re-opening due to the issues with unique index changes we discussed.

     
  • Dave Brondsema

    Dave Brondsema - 2012-09-04
    • status: open --> code-review
     
  • Cory Johns - 2012-09-05
    • status: code-review --> closed
     
  • Dave Brondsema

    Dave Brondsema - 2012-09-06
    • labels: --> stability
     

Log in to post a comment.