Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: more logging for ChannelPool shutdown #2070

Merged
merged 4 commits into from
Oct 6, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ Channel getChannel(int affinity) {
/** {@inheritDoc} */
@Override
public ManagedChannel shutdown() {
LOG.fine("Initiating graceful shutdown due to explicit request");

List<Entry> localEntries = entries.get();
for (Entry entry : localEntries) {
entry.channel.shutdown();
Expand Down Expand Up @@ -191,6 +193,8 @@ public boolean isTerminated() {
/** {@inheritDoc} */
@Override
public ManagedChannel shutdownNow() {
LOG.fine("Initiating immediate shutdown due to explicit request");

List<Entry> localEntries = entries.get();
for (Entry entry : localEntries) {
entry.channel.shutdownNow();
Expand Down Expand Up @@ -356,6 +360,7 @@ void refresh() {
// - then thread2 will shut down channel that thread1 will put back into circulation (after it
// replaces the list)
synchronized (entryWriteLock) {
LOG.fine("Refreshing all channels");
ArrayList<Entry> newEntries = new ArrayList<>(entries.get());

for (int i = 0; i < newEntries.size(); i++) {
Expand Down
Loading