Skip to content

Commit

Permalink
[C] Add REMOVE_BY_DESTINATION_ID to debug logging.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeb01 committed Sep 2, 2024
1 parent fe0919d commit 3b14277
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
17 changes: 17 additions & 0 deletions aeron-driver/src/main/c/agent/aeron_driver_agent.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,7 @@ static aeron_driver_agent_log_event_t log_events[] =
{ "NAME_RESOLUTION_HOST_NAME", AERON_DRIVER_AGENT_EVENT_TYPE_OTHER, false },
{ "SEND_NAK_MESSAGE", AERON_DRIVER_AGENT_EVENT_TYPE_OTHER, false },
{ "RESEND", AERON_DRIVER_AGENT_EVENT_TYPE_OTHER, false },
{ "CMD_IN_REMOVE_DESTINATION_BY_ID", AERON_DRIVER_AGENT_EVENT_TYPE_CMD_IN, false },
{ "ADD_DYNAMIC_DISSECTOR", AERON_DRIVER_AGENT_EVENT_TYPE_OTHER, false },
{ "DYNAMIC_DISSECTOR_EVENT", AERON_DRIVER_AGENT_EVENT_TYPE_OTHER, false },
};
Expand Down Expand Up @@ -597,6 +598,9 @@ static aeron_driver_agent_event_t command_id_to_driver_event_id(const int32_t ms
case AERON_RESPONSE_ON_CLIENT_TIMEOUT:
return AERON_DRIVER_EVENT_CMD_OUT_ON_CLIENT_TIMEOUT;

case AERON_COMMAND_REMOVE_DESTINATION_BY_ID:
return AERON_DRIVER_EVENT_CMD_IN_REMOVE_DESTINATION_BY_ID;

default:
return AERON_DRIVER_EVENT_UNKNOWN_EVENT;
}
Expand Down Expand Up @@ -1540,6 +1544,19 @@ static const char *dissect_cmd_in(int64_t cmd_id, const void *message, size_t le
break;
}

case AERON_COMMAND_REMOVE_DESTINATION_BY_ID:
{
aeron_destination_by_id_command_t *command = (aeron_destination_by_id_command_t *)message;

snprintf(
buffer,
sizeof(buffer) - 1,
"resourceRegistrationId=%" PRId64 " destinationRegistrationId=%" PRId64,
command->resource_registration_id,
command->destination_registration_id);
break;
}

default:
break;
}
Expand Down
5 changes: 3 additions & 2 deletions aeron-driver/src/main/c/agent/aeron_driver_agent.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,11 @@ typedef enum aeron_driver_agent_event_enum
AERON_DRIVER_EVENT_NAME_RESOLUTION_HOST_NAME = 53,
AERON_DRIVER_EVENT_SEND_NAK_MESSAGE = 54,
AERON_DRIVER_EVENT_RESEND = 55,
AERON_DRIVER_EVENT_CMD_IN_REMOVE_DESTINATION_BY_ID = 56,

// C-specific events. Note: event IDs are dynamic to avoid gaps in the sparse arrays.
AERON_DRIVER_EVENT_ADD_DYNAMIC_DISSECTOR = 56,
AERON_DRIVER_EVENT_DYNAMIC_DISSECTOR_EVENT = 57,
AERON_DRIVER_EVENT_ADD_DYNAMIC_DISSECTOR = 57,
AERON_DRIVER_EVENT_DYNAMIC_DISSECTOR_EVENT = 58,
}
aeron_driver_agent_event_t;

Expand Down

0 comments on commit 3b14277

Please sign in to comment.