-
Notifications
You must be signed in to change notification settings - Fork 8.7k
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
optimize: gracefully close resources #2139
Conversation
bugfix: fix mysql connection unable to release (apache#2037)
Codecov Report
@@ Coverage Diff @@
## develop #2139 +/- ##
=============================================
- Coverage 54.4% 54.38% -0.02%
+ Complexity 2469 2467 -2
=============================================
Files 445 445
Lines 14742 14742
Branches 1734 1734
=============================================
- Hits 8020 8018 -2
Misses 5963 5963
- Partials 759 761 +2
|
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
oos = new ObjectOutputStream(baos); | ||
try (ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
ObjectOutputStream oos = new ObjectOutputStream(baos)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The close method of ByteArrayOutputStream actually does nothing.The close method of ObjectOutputStream should be called.
...aga-engine-store/src/main/java/io/seata/saga/engine/serializer/impl/ExceptionSerializer.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left some comments.
PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM.
optimize: gracefully close resources (apache#2139)
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
oos = new ObjectOutputStream(baos); | ||
ByteArrayOutputStream baos = new ByteArrayOutputStream(); | ||
try (ObjectOutputStream oos = new ObjectOutputStream(baos)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if ObjectOutputStream close error , it will throw an exception?
* 'develop' of https://github.com/seata/seata: (125 commits) optimize: tcc module code style (apache#2103) refactor: change the package path of MySQL recognizer (apache#2125) optimize: fix query typo (apache#2176) refactor: add sql parser type druid as constant (apache#2156) test: enhance test coverage of seata common (apache#2170) optimize: gracefully close resources (apache#2139) Feature: Saga provide a switch to skip branch report on branch success, in order to optimize performance. (apache#2151) chore:use serializer instead of codec (apache#2097) optimize: spring module code style (apache#2159) optimize: Add Dubbo compatibility (apache#2036) optimize : seata-rm-datasource module code style (apache#2062) bugfix: Saga report branch status incorrect when service retried succeed (apache#2145) optimize:optimize log specifications (apache#2146) bugfix: when branchRollback failed, it will trigger retry of multi-tc. (apache#2113) refactor: create sql parser spi and a druid type sql parser (apache#1703) refactor: simplify to make seata-common more readable (apache#2038) feature: support FastThreadLocalContextCore (apache#2106) optimize: some typos (apache#2120) optimize: increase the oracle table meta cache code coverage (apache#2078) optimize: some typos (apache#2115) ... # Conflicts: # pom.xml
No description provided.