Merge branch '2.3' into develop
This commit is contained in:
@ -2984,7 +2984,7 @@ void config_set_global_defaults()
|
||||
gateway.peer_password[0] = '\0';
|
||||
gateway.log_target = MXB_LOG_TARGET_DEFAULT;
|
||||
|
||||
gateway.qc_cache_properties.max_size = get_total_memory() * 0.4;
|
||||
gateway.qc_cache_properties.max_size = get_total_memory() * 0.15;
|
||||
|
||||
if (gateway.qc_cache_properties.max_size == 0)
|
||||
{
|
||||
|
||||
@ -513,6 +513,7 @@ int dcb_read(DCB* dcb,
|
||||
GWBUF** head,
|
||||
int maxbytes)
|
||||
{
|
||||
mxb_assert(dcb->owner == RoutingWorker::get_current());
|
||||
int nsingleread = 0;
|
||||
int nreadtotal = 0;
|
||||
|
||||
@ -853,6 +854,7 @@ static int dcb_log_errors_SSL(DCB* dcb, int ret)
|
||||
*/
|
||||
int dcb_write(DCB* dcb, GWBUF* queue)
|
||||
{
|
||||
mxb_assert(dcb->owner == RoutingWorker::get_current());
|
||||
dcb->writeqlen += gwbuf_length(queue);
|
||||
// The following guarantees that queue is not NULL
|
||||
if (!dcb_write_parameter_check(dcb, queue))
|
||||
@ -2825,6 +2827,7 @@ public:
|
||||
RoutingWorker& rworker = static_cast<RoutingWorker&>(worker);
|
||||
if (dcb_is_still_valid(m_dcb, rworker.id()) && m_dcb->m_uid == m_uid)
|
||||
{
|
||||
mxb_assert(m_dcb->owner == RoutingWorker::get_current());
|
||||
m_dcb->fakeq = m_buffer;
|
||||
dcb_handler(m_dcb, m_ev);
|
||||
}
|
||||
@ -2845,6 +2848,7 @@ static void poll_add_event_to_dcb(DCB* dcb, GWBUF* buf, uint32_t ev)
|
||||
{
|
||||
if (dcb == this_thread.current_dcb)
|
||||
{
|
||||
mxb_assert(dcb->owner == RoutingWorker::get_current());
|
||||
// If the fake event is added to the current DCB, we arrange for
|
||||
// it to be handled immediately in dcb_handler() when the handling
|
||||
// of the current events are done...
|
||||
|
||||
@ -177,10 +177,15 @@ public:
|
||||
mxb_assert(peek(canonical_stmt) == nullptr);
|
||||
mxb_assert(this_unit.classifier);
|
||||
|
||||
// 0xffffff is the maximum packet size, 4 is for packet header and 1 is for command byte. These are
|
||||
// MariaDB/MySQL protocol specific values that are also defined in <maxscale/protocol/mysql.h> but
|
||||
// should not be exposed to the core.
|
||||
constexpr int64_t max_entry_size = 0xffffff - 5;
|
||||
|
||||
int64_t cache_max_size = this_unit.cache_max_size() / config_get_global_options()->n_threads;
|
||||
int64_t size = canonical_stmt.size();
|
||||
|
||||
if (size <= cache_max_size)
|
||||
if (size < max_entry_size && size <= cache_max_size)
|
||||
{
|
||||
int64_t required_space = (m_stats.size + size) - cache_max_size;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user