Changeset 636

Show
Ignore:
Timestamp:
11/15/07 17:09:03 (1 year ago)
Author:
dormando
Message:

Remove global id overflow check in CAS, and NOT FOUND should be NOT_FOUND.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/server/items.c

    r635 r636  
    4343/* Get the next CAS id for a new item. */ 
    4444uint64_t get_cas_id() { 
    45     static uint64_t cas_id; 
    46     if(cas_id >= MAX_CAS_ID) { 
    47         cas_id = 0; 
    48     } 
     45    static uint64_t cas_id = 0; 
    4946    return ++cas_id; 
    5047} 
  • trunk/server/memcached.c

    r635 r636  
    705705          out_string(c, "EXISTS"); 
    706706      else if(ret == 3) 
    707           out_string(c, "NOT FOUND"); 
     707          out_string(c, "NOT_FOUND"); 
    708708      else 
    709709          out_string(c, "NOT_STORED"); 
  • trunk/server/memcached.h

    r635 r636  
    3232#define IOV_LIST_HIGHWAT 600 
    3333#define MSG_LIST_HIGHWAT 100 
    34  
    35 #define MAX_CAS_ID 0x7ffffffffffffff0 
    3634 
    3735/* Get a consistent bool type */ 
  • trunk/server/t/cas.t

    r617 r636  
    4242# cas missing 
    4343print $sock "cas foo 0 0 6 $result[0]\r\nbarva2\r\n"; 
    44 is(scalar <$sock>, "NOT FOUND\r\n", "cas failed, foo does not exist"); 
     44is(scalar <$sock>, "NOT_FOUND\r\n", "cas failed, foo does not exist"); 
    4545