Skip to content

Commit

Permalink
[C/Java] Rename Error Messages to Error Frames.
Browse files Browse the repository at this point in the history
  • Loading branch information
mikeb01 committed Jun 16, 2024
1 parent 799a623 commit 38472cb
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 13 deletions.
2 changes: 1 addition & 1 deletion aeron-driver/src/main/c/aeron_driver_sender.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ int aeron_driver_sender_init(
sender->nak_messages_received_counter = aeron_system_counter_addr(
system_counters, AERON_SYSTEM_COUNTER_NAK_MESSAGES_RECEIVED);
sender->error_messages_received_counter = aeron_system_counter_addr(
system_counters, AERON_SYSTEM_COUNTER_ERROR_MESSAGES_RECEIVED);
system_counters, AERON_SYSTEM_COUNTER_ERROR_FRAMES_RECEIVED);
sender->resolution_changes_counter = aeron_system_counter_addr(
system_counters, AERON_SYSTEM_COUNTER_RESOLUTION_CHANGES);
sender->short_sends_counter = aeron_system_counter_addr(system_counters, AERON_SYSTEM_COUNTER_SHORT_SENDS);
Expand Down
2 changes: 1 addition & 1 deletion aeron-driver/src/main/c/aeron_system_counters.c
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ static aeron_system_counter_t system_counters[] =
{ "Aeron software: version=" AERON_VERSION_TXT " commit=" AERON_VERSION_GITSHA, AERON_SYSTEM_COUNTER_AERON_VERSION },
{ "Bytes currently mapped", AERON_SYSTEM_COUNTER_BYTES_CURRENTLY_MAPPED },
{ "Retransmitted bytes", AERON_SYSTEM_COUNTER_RETRANSMITTED_BYTES },
{ "Error Messages received", AERON_SYSTEM_COUNTER_ERROR_MESSAGES_RECEIVED },
{ "Error Frames received", AERON_SYSTEM_COUNTER_ERROR_FRAMES_RECEIVED },
};

static size_t num_system_counters = sizeof(system_counters) / sizeof(aeron_system_counter_t);
Expand Down
2 changes: 1 addition & 1 deletion aeron-driver/src/main/c/aeron_system_counters.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ typedef enum aeron_system_counter_enum_stct
AERON_SYSTEM_COUNTER_AERON_VERSION = 34,
AERON_SYSTEM_COUNTER_BYTES_CURRENTLY_MAPPED = 35,
AERON_SYSTEM_COUNTER_RETRANSMITTED_BYTES = 36,
AERON_SYSTEM_COUNTER_ERROR_MESSAGES_RECEIVED = 37,
AERON_SYSTEM_COUNTER_ERROR_FRAMES_RECEIVED = 37,

// Add all new counters before this one (used for a static assertion).
AERON_SYSTEM_COUNTER_DUMMY_LAST,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@

import static io.aeron.driver.media.SendChannelEndpoint.DESTINATION_TIMEOUT;
import static io.aeron.driver.media.UdpChannelTransport.sendError;
import static io.aeron.driver.status.SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED;
import static io.aeron.driver.status.SystemCounterDescriptor.ERROR_FRAMES_RECEIVED;
import static io.aeron.driver.status.SystemCounterDescriptor.NAK_MESSAGES_RECEIVED;
import static io.aeron.driver.status.SystemCounterDescriptor.STATUS_MESSAGES_RECEIVED;
import static io.aeron.protocol.StatusMessageFlyweight.SEND_SETUP_FLAG;
Expand Down Expand Up @@ -105,7 +105,7 @@ public SendChannelEndpoint(

nakMessagesReceived = context.systemCounters().get(NAK_MESSAGES_RECEIVED);
statusMessagesReceived = context.systemCounters().get(STATUS_MESSAGES_RECEIVED);
errorMessagesReceived = context.systemCounters().get(ERROR_MESSAGES_RECEIVED);
errorMessagesReceived = context.systemCounters().get(ERROR_FRAMES_RECEIVED);
this.statusIndicator = statusIndicator;

MultiSndDestination multiSndDestination = null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ public enum SystemCounterDescriptor
/**
* A count of the number of error messages received from a remote archive.
*/
ERROR_MESSAGES_RECEIVED(37, "Error Messages received");
ERROR_FRAMES_RECEIVED(37, "Error Frames received");

/**
* All system counters have the same type id, i.e. system counters are the same type. Other types can exist.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
import org.junit.jupiter.api.extension.ExtendWith;
import org.junit.jupiter.api.extension.RegisterExtension;

import java.nio.charset.StandardCharsets;
import java.util.Arrays;
import java.util.concurrent.TimeUnit;
import java.util.concurrent.atomic.AtomicBoolean;
Expand Down Expand Up @@ -96,7 +95,7 @@ void shouldInvalidateSubscriptionsImage()
Tests.awaitConnected(sub);

final long initialErrorMessagesReceived = aeron.countersReader()
.getCounterValue(SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED.id());
.getCounterValue(SystemCounterDescriptor.ERROR_FRAMES_RECEIVED.id());

while (pub.offer(message) < 0)
{
Expand Down Expand Up @@ -124,7 +123,7 @@ void shouldInvalidateSubscriptionsImage()
assertThat(t1 - t0, lessThan(value));

while (initialErrorMessagesReceived == aeron.countersReader()
.getCounterValue(SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED.id()))
.getCounterValue(SystemCounterDescriptor.ERROR_FRAMES_RECEIVED.id()))
{
Tests.yield();
}
Expand All @@ -135,7 +134,7 @@ void shouldInvalidateSubscriptionsImage()
}

assertThat(
aeron.countersReader().getCounterValue(SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED.id()),
aeron.countersReader().getCounterValue(SystemCounterDescriptor.ERROR_FRAMES_RECEIVED.id()),
lessThan(A_VALUE_THAT_SHOWS_WE_ARENT_SPAMMING_ERROR_MESSAGES));
}
}
Expand Down Expand Up @@ -171,7 +170,7 @@ void shouldInvalidateSubscriptionsImageManualMdc()
Tests.awaitConnected(sub);

final long initialErrorMessagesReceived = aeron.countersReader()
.getCounterValue(SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED.id());
.getCounterValue(SystemCounterDescriptor.ERROR_FRAMES_RECEIVED.id());

while (pub.offer(message) < 0)
{
Expand Down Expand Up @@ -200,7 +199,7 @@ void shouldInvalidateSubscriptionsImageManualMdc()
assertThat(t1 - t0, lessThan(value));

while (initialErrorMessagesReceived == aeron.countersReader()
.getCounterValue(SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED.id()))
.getCounterValue(SystemCounterDescriptor.ERROR_FRAMES_RECEIVED.id()))
{
Tests.yield();
}
Expand All @@ -211,7 +210,7 @@ void shouldInvalidateSubscriptionsImageManualMdc()
}

assertThat(
aeron.countersReader().getCounterValue(SystemCounterDescriptor.ERROR_MESSAGES_RECEIVED.id()),
aeron.countersReader().getCounterValue(SystemCounterDescriptor.ERROR_FRAMES_RECEIVED.id()),
lessThan(A_VALUE_THAT_SHOWS_WE_ARENT_SPAMMING_ERROR_MESSAGES));

while (initialAvailable != imageAvailable.get())
Expand Down

0 comments on commit 38472cb

Please sign in to comment.