qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (DISPATCH-557) High connection rates cause problems in the Python management agent
Date Tue, 13 Dec 2016 18:38:00 GMT

    [ https://issues.apache.org/jira/browse/DISPATCH-557?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15745876#comment-15745876
] 

ASF GitHub Bot commented on DISPATCH-557:
-----------------------------------------

Github user ted-ross commented on a diff in the pull request:

    https://github.com/apache/qpid-dispatch/pull/125#discussion_r92234597
  
    --- Diff: src/router_core/agent_connection.c ---
    @@ -0,0 +1,344 @@
    +/*
    + * 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.
    + */
    +
    +#include <qpid/dispatch/ctools.h>
    +#include "agent_connection.h"
    +#include <inttypes.h>
    +#include <stdio.h>
    +
    +#define QDR_CONNECTION_IDENTITY         0
    +#define QDR_CONNECTION_HOST             1
    +#define QDR_CONNECTION_ROLE             2
    +#define QDR_CONNECTION_DIR              3
    +#define QDR_CONNECTION_CONTAINER_ID     4
    +#define QDR_CONNECTION_SASL_MECHANISMS  5
    +#define QDR_CONNECTION_IS_AUTHENTICATED 6
    +#define QDR_CONNECTION_USER             7
    +#define QDR_CONNECTION_IS_ENCRYPTED     8
    +#define QDR_CONNECTION_SSLPROTO         9
    +#define QDR_CONNECTION_SSLCIPHER        10
    +#define QDR_CONNECTION_PROPERTIES       11
    +#define QDR_CONNECTION_SSLSSF           12
    +
    +const char *qdr_connection_columns[] =
    +    {"identity",
    +     "host",
    +     "role",
    +     "dir",
    +     "container",
    +     "sasl",
    +     "isAuthenticated",
    +     "user",
    +     "isEncrypted",
    +     "sslProto",
    +     "sslCipher",
    +     "properties",
    +     "sslSsf",
    +     0};
    +
    +const char *CONFIG_CONNECTION_TYPE = "org.apache.qpid.dispatch.connection";
    +
    +
    +static void qd_get_next_pn_data(pn_data_t **data, const char **d, int *d1)
    +{
    +    if (pn_data_next(*data)) {
    +        switch (pn_data_type(*data)) {
    +            case PN_STRING:
    +                *d = pn_data_get_string(*data).start;
    +                break;
    +            case PN_SYMBOL:
    +                *d = pn_data_get_symbol(*data).start;
    +                break;
    +            case PN_INT:
    +                *d1 = pn_data_get_int(*data);
    +                break;
    +            default:
    +                break;
    +        }
    +    }
    +    }
    +
    +
    +static void qdr_connection_insert_column_CT(qdr_connection_t *conn, int col, qd_composed_field_t
*body, bool as_map)
    +{
    +    char id_str[100];
    +
    +    if (as_map)
    +        qd_compose_insert_string(body, qdr_connection_columns[col]);
    +
    +    switch(col) {
    +    case QDR_CONNECTION_IDENTITY: {
    +        snprintf(id_str, 100, "%"PRId64, conn->identity);
    +        qd_compose_insert_string(body, id_str);
    +        break;
    +    }
    +
    +    case QDR_CONNECTION_HOST:
    +        qd_compose_insert_string(body, conn->connection_info->host);
    +        break;
    +
    +    case QDR_CONNECTION_ROLE:
    +        qd_compose_insert_string(body, conn->connection_info->role);
    +        break;
    +
    +    case QDR_CONNECTION_DIR:
    +        qd_compose_insert_string(body, conn->connection_info->dir);
    +        break;
    +
    +    case QDR_CONNECTION_CONTAINER_ID:
    +        if (conn->connection_info->container)
    +            qd_compose_insert_string(body, conn->connection_info->container);
    +        else
    +            qd_compose_insert_null(body);
    +        break;
    +
    +    case QDR_CONNECTION_SASL_MECHANISMS:
    +        qd_compose_insert_string(body, conn->connection_info->sasl_mechanisms);
    --- End diff --
    
    sasl_mechanisms is 0 if not specified.  That causes a crash here (easily reproducible
by starting the web console).  If it's not present, this should insert a NULL into the body.


> High connection rates cause problems in the Python management agent
> -------------------------------------------------------------------
>
>                 Key: DISPATCH-557
>                 URL: https://issues.apache.org/jira/browse/DISPATCH-557
>             Project: Qpid Dispatch
>          Issue Type: Bug
>          Components: Management Agent
>    Affects Versions: 0.7.0
>            Reporter: Ted Ross
>            Assignee: Ganesh Murthy
>            Priority: Critical
>             Fix For: 0.8.0
>
>
> Since connection entities are the only non-configuration (spontaneously occurring) entities
that are still managed by the Python agent, high rates of opening and closing connections
causes large CPU overhead in the agent.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@qpid.apache.org
For additional commands, e-mail: dev-help@qpid.apache.org


Mime
View raw message