-
- /* get nothing from server for this task item */
- if (mlget_item->verify && !mlget_item->finish_verify) {
- /* verify expire time if necessary */
- if (item->exp_time > 0) {
- struct timeval curr_time;
- gettimeofday(&curr_time, NULL);
-
- /* object doesn't expire but can't get it now */
- if (curr_time.tv_sec - item->client_time
- < item->exp_time - EXPIRE_TIME_ERROR) {
- __sync_fetch_and_add(&ms_stats.unexp_unget, 1);
-
- if (ms_setting.verbose) {
- char set_time[64];
- char cur_time[64];
- strftime(set_time, 64, "%Y-%m-%d %H:%M:%S",
- localtime(&item->client_time));
- strftime(cur_time, 64, "%Y-%m-%d %H:%M:%S",
- localtime(&curr_time.tv_sec));
- fprintf(stderr, "\n\t<%d expire time verification failed, object "
- "doesn't expire but can't get it now\n"
- "\tkey len: %d\n"
- "\tkey: %lx %.*s\n"
- "\tset time: %s current time: %s "
- "diff time: %d expire time: %d\n"
- "\texpected data len: %d\n"
- "\texpected data: %.*s\n"
- "\treceived data: \n",
- c->sfd, item->key_size, item->key_prefix,
- item->key_size - (int)KEY_PREFIX_SIZE,
- orignkey, set_time, cur_time,
- (int)(curr_time.tv_sec - item->client_time), item->exp_time,
- item->value_size, item->value_size, orignval);
- fflush(stderr);
- }
- }
- } else {
- __sync_fetch_and_add(&ms_stats.vef_miss, 1);
-
- if (ms_setting.verbose) {
- fprintf(stderr, "\n<%d data verification failed\n"
- "\tkey len: %d\n"
- "\tkey: %lx %.*s\n"
- "\texpected data len: %d\n"
- "\texpected data: %.*s\n"
- "\treceived data: \n",
- c->sfd, item->key_size, item->key_prefix,
- item->key_size - (int)KEY_PREFIX_SIZE,
- orignkey, item->value_size, item->value_size, orignval);
- fflush(stderr);
- }
- }
+ }
+ else
+ {
+ atomic_add_size(&ms_stats.vef_miss, 1);
+
+ if (ms_setting.verbose)
+ {
+ fprintf(stderr, "\n<%d data verification failed\n"
+ "\tkey len: %d\n"
+ "\tkey: %" PRIx64 " %.*s\n"
+ "\texpected data len: %d\n"
+ "\texpected data: %.*s\n"
+ "\treceived data: \n",
+ c->sfd, item->key_size, item->key_prefix,
+ item->key_size - (int)KEY_PREFIX_SIZE,
+ orignkey, item->value_size, item->value_size, orignval);
+ fflush(stderr);