Comment 3 for bug 379264

Revision history for this message
MadMatt (yonkovim) wrote :

Had to change the code to where block > 0, 0 is the sys temp space.

This works, but still causes the random corruption.

Yves found another free page function in the fsp side of things in the fseg_free_page_low function. I want ahead and added this:

        /* Variables for WaffleGrid, the innodb_buffer_pool layer 2 cache */
        MEMC_CONN_T *memct;
        ulint sec,fsec,fmsec,msec;

        /* Drop search system page hash index if the page is found in
        the pool and is hashed */

memct = (MEMC_CONN_T*) thr_local_get_memc(os_thread_get_curr_id());

        if (srv_memcached_enable) {

            if (memct->mc_conn) {
                if (srv_memcached_prefix != memct->connect_prefix) {
                    memct->mc_ret_value = NULL;
                } else {
                    /* set the memcache key */
                    sprintf(memct->mc_key,"%lx:%lx:%lx",srv_memcached_prefix,(ulong) space,
                            (ulong) page);
                    ut_usectime(&sec,&msec);
                    memct->mc_ret_value = memcached_get(memct->mc_conn, memct->mc_key, strlen(memct->mc_key),
                                            &memct->mc_ret_length, &memct->mc_flags, &memct->mcrc);
                    if (memct->mc_ret_value) {
                        if (memct->mc_flags != (uint32_t) crc32(0L, memct->mc_ret_value,memct->mc_ret_length)) {
                            fprintf(stderr,"Block corruption for key %s\n",memct->mc_key);
                            memct->mc_ret_value = NULL;
                        }
                        fprintf(stderr, "found deleted page via fspc : %s \n", memct->mc_key);
                    }
                }
              }
          }

I got 427 "found deleted" messages. But still the random corruption.

Digging deeper into the fseg_free_page_low function the next call is to

btr_search_drop_page_hash_when_freed(space, page);

this function calls:

buf_page_get_gen which calls buf_read_page which calls read_page_low which is a memcached function....

This means the call I added was redundant. However I am still looking at that function, it does move the entire extend to the free lsit... so maybe this could have some negative impact.