Skip to content

STAR-891 Add pluggable disk/commit log error handlers and shutdown hooks#271

Merged
djatnieks merged 2 commits intods-trunkfrom
STAR-891
Nov 5, 2021
Merged

STAR-891 Add pluggable disk/commit log error handlers and shutdown hooks#271
djatnieks merged 2 commits intods-trunkfrom
STAR-891

Conversation

@djatnieks
Copy link
Copy Markdown
Member

No description provided.

Copy link
Copy Markdown
Member

@k-rus k-rus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM
I have few nit comments. I also see that the PR's quality is not accepted by SolarCloud. So I guess I will need to look again when it is satisfied.

Comment thread src/java/org/apache/cassandra/utils/JVMKiller.java Outdated
}

if (err != null)
logger.error("Got error when removing shutdown hook(s): {}", err.getMessage(), err);
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be?:

Suggested change
logger.error("Got error when removing shutdown hook(s): {}", err.getMessage(), err);
logger.error("Got error(s) when removing shutdown hook(s): {}", err.getMessage(), err);

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it correct to log the error if killJVM was called to be quiet? To me it sounds as violation of the interface description:

@param quiet - whether the error should be logged verbosely

In this case, I think it's ok.
The quiet flag controls the verbose printing of a stack trace to syserr and log file about the error that triggered the shutdown.
However, this log message is about a secondary error while removing shutdown hooks and may be important diagnostic/debug information.
In other words, the quiet flag means shutdown without verbose reporting on the error that triggered the shutdown, but if there is a subsequent error removing shutdown hooks, those are still logged (not quite as verbosely since it goes to the log file only).
Well, in the end I guess it's subjective but imo the current arrangement is likely intended and seems ok to me.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree. I should be more thoughtful here during review :)
BTW, when quiet is false the print of error contains unnecessary extra space between the sentences in this line of the implementation.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries, it was a good discussion to have :)

Comment thread src/java/org/apache/cassandra/utils/JVMStabilityInspector.java
Comment thread src/java/org/apache/cassandra/utils/JVMStabilityInspector.java Outdated
@djatnieks
Copy link
Copy Markdown
Member Author

LGTM I have few nit comments. I also see that the PR's quality is not accepted by SolarCloud. So I guess I will need to look again when it is satisfied.

Sorry, I didn't notice the test coverage earlier; I have applied some updates and tried to improve test coverage.

@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Nov 5, 2021

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug B 2 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 0 Code Smells

87.8% 87.8% Coverage
0.0% 0.0% Duplication

@djatnieks djatnieks requested a review from k-rus November 5, 2021 04:20
Copy link
Copy Markdown
Member

@k-rus k-rus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@djatnieks djatnieks merged commit c6cd4ee into ds-trunk Nov 5, 2021
@djatnieks djatnieks deleted the STAR-891 branch November 5, 2021 20:50
jacek-lewandowski pushed a commit that referenced this pull request Mar 8, 2022
jacek-lewandowski pushed a commit that referenced this pull request Mar 9, 2022
jacek-lewandowski pushed a commit that referenced this pull request Mar 27, 2022
jacek-lewandowski pushed a commit that referenced this pull request May 26, 2022
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
jacek-lewandowski pushed a commit that referenced this pull request May 27, 2022
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
jacek-lewandowski pushed a commit that referenced this pull request Oct 17, 2022
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
jacek-lewandowski pushed a commit that referenced this pull request Oct 18, 2022
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
mfleming pushed a commit that referenced this pull request Jul 10, 2023
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
djatnieks added a commit that referenced this pull request Jul 24, 2023
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
djatnieks added a commit that referenced this pull request Aug 22, 2023
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)
djatnieks added a commit that referenced this pull request Sep 12, 2023
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294
jacek-lewandowski pushed a commit that referenced this pull request Jan 28, 2024
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
djatnieks added a commit that referenced this pull request Mar 29, 2024
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
djatnieks added a commit that referenced this pull request Apr 1, 2024
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
djatnieks added a commit that referenced this pull request Apr 16, 2024
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
djatnieks added a commit that referenced this pull request Jan 30, 2025
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
djatnieks added a commit that referenced this pull request May 18, 2025
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
michaelsembwever pushed a commit that referenced this pull request Feb 6, 2026
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)
michaelsembwever pushed a commit that referenced this pull request Feb 10, 2026
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)

 (Rebase of commit 3ac50e1)
michaelsembwever pushed a commit that referenced this pull request Feb 11, 2026
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)

 (Rebase of commit 3ac50e1)
michaelsembwever pushed a commit that referenced this pull request Feb 12, 2026
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)

 (Rebase of commit 3ac50e1)
michaelsembwever added a commit that referenced this pull request Feb 14, 2026
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)

 (Rebase of commit 3ac50e1)
michaelsembwever added a commit that referenced this pull request Feb 16, 2026
…oks (#271)

(cherry picked from commit c6cd4ee)
(cherry picked from commit fb5c241)
(cherry picked from commit f7f8e0a)
(cherry picked from commit 0ff7339)
(cherry picked from commit e7ca94c)

STAR-891 Fix conflict in DiskFailurePolicyTest with CASSANDRA-18294

(cherry picked from commit 07cd5c9)

 (Rebase of commit 3ac50e1)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants