A brief file description. More...
#include "P_Cluster.h"
Go to the source code of this file.
A brief file description.
Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Definition in file ClusterCache.cc.
#define ALLOW_THREAD_STEAL true |
Definition at line 86 of file ClusterCache.cc.
#define CACHE_NO_RESPONSE 0 |
Definition at line 65 of file ClusterCache.cc.
Referenced by CacheContinuation::do_op().
#define DOT_SEPARATED | ( | _x | ) |
((unsigned char*)&(_x))[0], ((unsigned char*)&(_x))[1], \ ((unsigned char*)&(_x))[2], ((unsigned char*)&(_x))[3]
Definition at line 81 of file ClusterCache.cc.
Referenced by cache_op_ClusterFunction(), ClusterAccept::ClusterAcceptMachine(), ClusterHandler::connectClusterEvent(), default_api_ClusterFunction(), ClusterHandler::dump_internal_data(), ClusterHandler::machine_down(), MachineStatusSM::MachineStatusSMEvent(), ClusterHandler::mainClusterEvent(), ClusterHandler::process_read(), ClusterHandler::process_write(), ClusterHandler::protoZombieEvent(), CacheContinuation::remoteOpEvent(), ClusterHandler::startClusterEvent(), and TSSendClusterRPC().
#define ET_CACHE_CONT_SM ET_NET |
Definition at line 85 of file ClusterCache.cc.
Referenced by cache_op_result_ClusterFunction(), CacheContinuation::callback_failure(), CacheContinuation::defer_callback_result(), CacheContinuation::do_op(), CacheContinuation::do_remote_lookup(), ClusterVConnectionCacheEvent::eventHandler(), ClusterVConnectionCache::init(), CacheContinuation::insert_cache_callback_user(), CacheContinuation::insertCallbackEvent(), CacheContinuation::lookupOpenWriteVC(), and CacheContinuation::remove_and_delete().
typedef int(retryDisposeOfDataBuffer::* rtryDisOfDBufHandler)(int, void *) |
Definition at line 1878 of file ClusterCache.cc.
void cache_lookup_ClusterFunction | ( | ClusterHandler * | ch, | |
void * | data, | |||
int | len | |||
) |
Definition at line 2628 of file ClusterCache.cc.
References Alias32::byte, cache_lookup_ClusterFunction, CACHE_LOOKUP_OP, CacheContinuation::cacheContAllocator_alloc(), caches, CLUSTER_CACHE_OUTSTANDING_STAT, CLUSTER_INCREMENT_DYN_STAT, CacheLookupMsg::frag_type, CacheContinuation::from, ClusterMessageHeader::GetMsgVersion(), ink_release_assert, Cache::lookup(), ClusterHandler::machine, CacheLookupMsg::moi, Continuation::mutex, Thread::mutex, MUTEX_TRY_LOCK, ClusterMessageHeader::NeedByteSwap(), new_ProxyMutex(), CacheContinuation::no_reply_message, op_to_sizeof_fixedlen_msg(), CacheContinuation::replyLookupEvent(), CacheContinuation::seq_number, CacheLookupMsg::seq_number, SET_CONTINUATION_HANDLER, CacheLookupMsg::SwapBytes(), this_ethread(), CacheLookupMsg::url_md5, and CacheContinuation::url_md5.
void cache_op_ClusterFunction | ( | ClusterHandler * | ch, | |
void * | data, | |||
int | len | |||
) |
Definition at line 1063 of file ClusterCache.cc.
References a, ACTION_RESULT_DONE, CacheContinuation::allocMsgBuffer(), CacheOpMsg_long::buffer_size, CacheOpMsg_short::buffer_size, Alias32::byte, CacheContinuation::cache_action, CACHE_ALLOW_MULTIPLE_WRITES, CACHE_DEREF, CACHE_EVENT_OPEN_READ_FAILED, CACHE_EVENT_OPEN_WRITE_FAILED, CACHE_LINK, cache_op_ClusterFunction, CACHE_OPEN_READ, CACHE_OPEN_READ_BUFFER, CACHE_OPEN_READ_BUFFER_LONG, CACHE_OPEN_READ_LONG, CACHE_OPEN_WRITE, CACHE_OPEN_WRITE_BUFFER, CACHE_OPEN_WRITE_BUFFER_LONG, CACHE_OPEN_WRITE_LONG, CACHE_REMOVE, CacheContinuation::cacheContAllocator_alloc(), CacheLookupHttpConfigAllocator, caches, CFL_ALLOW_MULTIPLE_WRITES, CacheContinuation::cfl_flags, CFL_LOPENWRITE_HAVE_OLDINFO, CFL_OVERWRITE_ON_WRITE, CFL_REMOVE_LINK, CFL_REMOVE_USER_AGENTS, CacheContinuation::ch, CacheOpMsg_long::channel, CacheOpMsg_short::channel, ClusterVCToken::clear(), CLUSTER_CACHE_OUTSTANDING_STAT, CLUSTER_CHAN_INUSE_STAT, CLUSTER_DELAYED_OPEN, CLUSTER_INCREMENT_DYN_STAT, CLUSTER_OPT_CONN_READ, CLUSTER_OPT_CONN_WRITE, CLUSTER_OPT_IMMEDIATE, CacheContinuation::cluster_vc_channel, clusterProcessor, ClusterProcessor::connect_local(), ClusterVConnection::current_cont, Debug, Cache::deref(), DOT_SEPARATED, ECLUSTER_CHANNEL_INUSE, CacheContinuation::frag_type, CacheContinuation::getMsgBuffer(), ClusterMessageHeader::GetMsgVersion(), HTTP_WKSIDX_DELETE, HTTP_WKSIDX_PURGE, CacheContinuation::ic_arena, CacheContinuation::ic_hostname, CacheContinuation::ic_hostname_len, CacheContinuation::ic_old_info, CacheContinuation::ic_params, CacheContinuation::ic_request, init_from_long(), init_from_short(), init_from_short_2(), ink_assert, ink_get_hrtime(), ink_release_assert, iobuffer_size_to_index(), ClusterVCToken::ip_created, Cache::link(), ClusterHandler::machine, CacheOpMsg_short::md5, CacheOpMsg_short_2::md5_1, CacheOpMsg_short_2::md5_2, memcpy, CacheOpMsg_short_2::moi, CacheOpMsg_short::moi, Continuation::mutex, Thread::mutex, MUTEX_TRY_LOCK, ClusterMessageHeader::NeedByteSwap(), new_IOBufferData, new_ProxyMutex(), op_to_sizeof_fixedlen_msg(), Cache::open_read(), Cache::open_write(), ClusterVConnection::pending_remote_fill, CacheContinuation::pin_in_cache, CacheContinuation::read_cluster_vc, Cache::remove(), CacheContinuation::replyOpEvent(), CacheContinuation::request_opcode, CacheContinuation::request_purge, CacheOpMsg_short_2::seq_number, CacheOpMsg_long::seq_number, CacheOpMsg_short::seq_number, CacheContinuation::seq_number, ClusterVCToken::sequence_number, SET_CONTINUATION_HANDLER, CacheContinuation::setMsgBufferLen(), CacheContinuation::setupReadWriteVC(), CacheContinuation::setupVCdataRead(), CacheOpMsg_long::sizeof_fixedlen_msg(), CacheContinuation::start_time, this_ethread(), CacheOpMsg_long::token, CacheOpMsg_short::token, CacheContinuation::token, HTTPInfo::unmarshal(), CacheLookupHttpConfig::unmarshal(), unmarshal_CacheOpMsg_long(), unmarshal_CacheOpMsg_short(), unmarshal_CacheOpMsg_short_2(), CacheOpMsg_long::url_md5, and CacheContinuation::write_cluster_vc.
void cache_op_malloc_ClusterFunction | ( | ClusterHandler * | ch, | |
void * | data, | |||
int | len | |||
) |
Definition at line 1464 of file ClusterCache.cc.
References cache_op_ClusterFunction, cache_op_malloc_ClusterFunction, clusterProcessor, and ClusterProcessor::free_remote_data().
void cache_op_result_ClusterFunction | ( | ClusterHandler * | ch, | |
void * | d, | |||
int | l | |||
) |
Definition at line 1976 of file ClusterCache.cc.
References ats_swap32(), CACHE_EVENT_DEREF_FAILED, CACHE_EVENT_LINK, CACHE_EVENT_LINK_FAILED, CACHE_EVENT_OPEN_READ, CACHE_EVENT_OPEN_READ_FAILED, CACHE_EVENT_OPEN_WRITE_FAILED, CACHE_EVENT_REMOVE_FAILED, CACHE_EVENT_RESPONSE_MSG, CACHE_EVENT_UPDATE_FAILED, cache_op_result_ClusterFunction, CACHE_RETRY_PERIOD, CacheContinuation::cacheContAllocator_alloc(), CLUSTER_INCREMENT_DYN_STAT, CLUSTER_REMOTE_OP_REPLY_TIMEOUTS_STAT, Debug, ET_CACHE_CONT_SM, event_is_open(), event_reply_may_have_moi(), eventProcessor, find_cache_continuation(), FOLDHASH, CacheContinuation::freeMsgBuffer(), ClusterMessageHeader::GetMsgVersion(), Continuation::handleEvent(), CacheContinuation::handleReplyEvent(), CacheContinuation::ic_new_info, ink_assert, ink_get_hrtime(), ink_release_assert, iobuffer_size_to_index(), ClusterMachine::ip, CacheOpReplyMsg::is_ram_cache_hit, ClusterHandler::machine, make_ptr(), memcpy, CacheOpReplyMsg::moi, Continuation::mutex, Thread::mutex, MUTEX_TAKE_TRY_LOCK, MUTEX_TRY_LOCK, MUTEX_UNTAKE_LOCK, ClusterMessageHeader::NeedByteSwap(), new_IOBufferData, new_ProxyMutex(), CacheContinuation::read_cluster_vc, CacheContinuation::result, CacheOpReplyMsg::result, CacheContinuation::result_error, EventProcessor::schedule_in(), CacheContinuation::seq_number, CacheOpReplyMsg::seq_number, SET_CONTINUATION_HANDLER, ClusterVConnection::set_ram_cache_hit(), CacheContinuation::setMsgBufferLen(), CacheOpReplyMsg::sizeof_fixedlen_msg(), CacheContinuation::start_time, CacheOpReplyMsg::SwapBytes(), CacheContinuation::target_ip, this_ethread(), CacheOpReplyMsg::token, CacheContinuation::token, Alias32::u32, and HTTPInfo::unmarshal().
static CacheContinuation * find_cache_continuation | ( | unsigned int | seq_number, | |
unsigned int | from_ip | |||
) | [static] |
Definition at line 2926 of file ClusterCache.cc.
References FOLDHASH, ink_release_assert, CacheContinuation::seq_number, and CacheContinuation::target_ip.
Referenced by cache_op_result_ClusterFunction(), CacheContinuation::handleReplyEvent(), and CacheContinuation::remoteOpEvent().
void init_from_long | ( | CacheContinuation * | cont, | |
CacheOpMsg_long * | msg, | |||
ClusterMachine * | m | |||
) | [inline] |
Definition at line 998 of file ClusterCache.cc.
References CacheOpMsg_long::buffer_size, CACHE_OPEN_READ_LONG, CACHE_OPEN_WRITE_LONG, CacheContinuation::caller_buf_freebytes, CacheOpMsg_long::cfl_flags, CacheContinuation::cfl_flags, CacheOpMsg_long::channel, CacheContinuation::cluster_vc_channel, CacheOpMsg_long::data, CacheOpMsg_long::frag_type, CacheContinuation::frag_type, CacheContinuation::from, CacheOpMsg_long::nbytes, CacheContinuation::nbytes, CacheContinuation::no_reply_message, CacheContinuation::pin_in_cache, CacheContinuation::request_opcode, CacheContinuation::seq_number, CacheOpMsg_long::seq_number, CacheOpMsg_long::token, CacheContinuation::token, CacheOpMsg_long::url_md5, and CacheContinuation::url_md5.
Referenced by cache_op_ClusterFunction().
void init_from_short | ( | CacheContinuation * | cont, | |
CacheOpMsg_short * | msg, | |||
ClusterMachine * | m | |||
) | [inline] |
Definition at line 1025 of file ClusterCache.cc.
References CacheOpMsg_short::buffer_size, CACHE_OPEN_READ, CACHE_OPEN_WRITE, CacheContinuation::caller_buf_freebytes, CacheOpMsg_short::cfl_flags, CacheContinuation::cfl_flags, CacheOpMsg_short::channel, CacheContinuation::cluster_vc_channel, CacheOpMsg_short::data, CacheOpMsg_short::frag_type, CacheContinuation::frag_type, CacheContinuation::from, CacheOpMsg_short::md5, CacheOpMsg_short::nbytes, CacheContinuation::nbytes, CacheContinuation::no_reply_message, CacheContinuation::pin_in_cache, CacheContinuation::request_opcode, CacheContinuation::seq_number, CacheOpMsg_short::seq_number, CacheOpMsg_short::token, CacheContinuation::token, and CacheContinuation::url_md5.
Referenced by cache_op_ClusterFunction().
void init_from_short_2 | ( | CacheContinuation * | cont, | |
CacheOpMsg_short_2 * | msg, | |||
ClusterMachine * | m | |||
) | [inline] |
Definition at line 1052 of file ClusterCache.cc.
References CacheOpMsg_short_2::cfl_flags, CacheContinuation::cfl_flags, CacheOpMsg_short_2::frag_type, CacheContinuation::frag_type, CacheContinuation::from, CacheOpMsg_short_2::md5_1, CacheContinuation::no_reply_message, CacheContinuation::seq_number, CacheOpMsg_short_2::seq_number, and CacheContinuation::url_md5.
Referenced by cache_op_ClusterFunction().
static unsigned int new_cache_sequence_number | ( | ) | [static] |
Definition at line 2951 of file ClusterCache.cc.
References cluster_sequence_number.
Referenced by CacheContinuation::do_op(), and CacheContinuation::do_remote_lookup().
CacheOpMsg_long* unmarshal_CacheOpMsg_long | ( | void * | data, | |
int | NeedByteSwap | |||
) | [inline] |
Definition at line 973 of file ClusterCache.cc.
References CacheOpMsg_long::SwapBytes().
Referenced by cache_op_ClusterFunction().
CacheOpMsg_short* unmarshal_CacheOpMsg_short | ( | void * | data, | |
int | NeedByteSwap | |||
) | [inline] |
Definition at line 981 of file ClusterCache.cc.
References CacheOpMsg_short::SwapBytes().
Referenced by cache_op_ClusterFunction().
CacheOpMsg_short_2* unmarshal_CacheOpMsg_short_2 | ( | void * | data, | |
int | NeedByteSwap | |||
) | [inline] |
Definition at line 989 of file ClusterCache.cc.
References CacheOpMsg_short_2::SwapBytes().
Referenced by cache_op_ClusterFunction().
ink_hrtime cache_cluster_timeout = CACHE_CLUSTER_TIMEOUT [static] |
Definition at line 71 of file ClusterCache.cc.
Referenced by CacheContinuation::do_op(), CacheContinuation::do_remote_lookup(), CacheContinuation::localVCsetupEvent(), CacheContinuation::remoteOpEvent(), and CacheContinuation::remove_and_delete().
int cache_migrate_on_demand = false |
Definition at line 54 of file ClusterCache.cc.
Referenced by CacheContinuation::do_remote_lookup().
ClassAllocator<CacheContinuation> cacheContAllocator("cacheContAllocator") [static] |
int cluster_sequence_number = 1 [static] |
Definition at line 66 of file ClusterCache.cc.
Referenced by new_cache_sequence_number().
ClassAllocator< ClusterVConnectionCache::Entry > ClusterVCCacheEntryAlloc("ClusterVConnectionCache::Entry") [static] |
Definition at line 206 of file ClusterCache.cc.
Queue<CacheContinuation> remoteCacheContQueue[REMOTE_CONNECT_HASH] [static] |
Definition at line 61 of file ClusterCache.cc.
Ptr<ProxyMutex> remoteCacheContQueueMutex[REMOTE_CONNECT_HASH] [static] |
Definition at line 62 of file ClusterCache.cc.