Changeset 45 for hw

Show
Ignore:
Timestamp:
09/25/07 19:23:59 (5 years ago)
Author:
cs186
Message:

Better comments in gistnext_checksplit

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • hw/hw2/postgresql-8.2.4/src/backend/access/gist/gistget.c

    r35 r45  
    209209} 
    210210 
    211 /*  
    212  * Support routine for gistnext.  Deals with concurrency control issues to  
    213  * check if a node on the (cached) search stack was split by a concurrent 
    214  * inserter.  If so, the result of the split can be found by adding right-hand  
    215  * neighbors of the split node to the search stack.  See  
    216  * Kornacker/Mohan/Hellerstein, SIGMOD 1997, for the protocol description. 
     211/* 
     212 * Support routine for gistnext.  Deals with concurrency control issues to 
     213 * check if the top node on the search stack was split by a concurrent 
     214 * inserter since the time it was put on the stack.  If so, the "rest" 
     215 * of the split can be found by adding the right-hand 
     216 * neighbor of the split node to the search stack.  See 
     217 * Kornacker/Mohan/Hellerstein, SIGMOD 1997, for details. 
    217218 */ 
    218219static void 
     
    238239      /* detect page split, follow right link to add pages */ 
    239240 
     241      /*  
     242       * CS186 HW2: Fix me! 
     243       * Modify this next code to put the rightlinked block on 
     244       * the priority queue. 
     245       * Note: since this page was split since it was inserted into 
     246       * the priority queue, it has fewer items on it, and a different 
     247       * bounding box, so its priority may have changed. 
     248       */ 
    240249      stk = (GISTSearchStack *) palloc0(sizeof(GISTSearchStack)); 
    241250      stk->next = so->stack->next;