Skip to content

[IOTDB-3708] Fix the NPE error when write failed using Ratis#6945

Merged
HTHou merged 1 commit intomasterfrom
xingtanzjr/fix_ratis_npe
Aug 11, 2022
Merged

[IOTDB-3708] Fix the NPE error when write failed using Ratis#6945
HTHou merged 1 commit intomasterfrom
xingtanzjr/fix_ratis_npe

Conversation

@xingtanzjr
Copy link
Contributor

Description

Before this change, the FragmentDispatcher may encounter NPE error when processing writeResponse because of TSStatus lack in the Object.

This PR gives a check for the null variables in ConsensusWriteResponse to avoid NPE from its dependents.

We need to refine the ConsensusWriteResponse later in the Consensus write method for each implementations to avoid null variable

@coveralls
Copy link

Coverage Status

Coverage increased (+0.009%) to 42.683% when pulling 7f6e449 on xingtanzjr/fix_ratis_npe into 6188f62 on master.

@sonarqubecloud
Copy link

SonarCloud Quality Gate failed.    Quality Gate failed

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

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@HTHou HTHou merged commit 67360ea into master Aug 11, 2022
@HTHou HTHou deleted the xingtanzjr/fix_ratis_npe branch August 11, 2022 07:33
@qiaojialin qiaojialin changed the title Fix the NPE error when write failed using Ratis [IOTDB-3708] Fix the NPE error when write failed using Ratis Aug 11, 2022
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