Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
dp
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Spencer Chang
dp
Commits
af57407b
Commit
af57407b
authored
Aug 14, 2020
by
Spencer Chang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[fix] 优化CountDownLatch.countDown节点
parent
7366a689
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
4 deletions
+5
-4
SysDpExecuteHistoryServiceImpl.java
...-code/dp/service/impl/SysDpExecuteHistoryServiceImpl.java
+5
-4
No files found.
v2-多线程版本/java-code/dp/service/impl/SysDpExecuteHistoryServiceImpl.java
View file @
af57407b
...
...
@@ -931,6 +931,7 @@ public class SysDpExecuteHistoryServiceImpl extends BaseServiceImpl<SysDpExecute
for
(
int
i
=
1
;
i
<=
length
;
i
++)
{
String
undo
=
undos
[
i
-
1
];
if
(
StringUtils
.
isBlank
(
undo
))
{
downLatch
.
countDown
();
continue
;
}
String
formatSql
=
undo
;
...
...
@@ -1024,13 +1025,13 @@ public class SysDpExecuteHistoryServiceImpl extends BaseServiceImpl<SysDpExecute
public
void
run
()
{
final
ReentrantLock
mainLock
=
this
.
mainLock
;
mainLock
.
lock
();
final
Integer
seq
=
subExecContext
.
getSeq
();
final
String
sql
=
subExecContext
.
getSql
();
try
{
final
SysDpExecuteHistoryService
service
=
subExecContext
.
getService
();
final
IRequest
requestContext
=
subExecContext
.
getRequestContext
();
final
String
sql
=
subExecContext
.
getSql
();
final
String
ip
=
subExecContext
.
getIp
();
final
String
execType
=
subExecContext
.
getExecType
();
final
Integer
seq
=
subExecContext
.
getSeq
();
try
{
ResponseData
subResponseData
=
new
ResponseData
();
if
(
StringUtils
.
equals
(
execType
,
SqlConstantUtils
.
SQL_EXEC_INSERT
))
{
subResponseData
=
service
.
insert
(
requestContext
,
ip
,
sql
);
...
...
@@ -1047,8 +1048,8 @@ public class SysDpExecuteHistoryServiceImpl extends BaseServiceImpl<SysDpExecute
retMsg
.
put
(
seq
,
e
.
getMessage
());
logger
.
info
(
"==> 执行语句[{}]出错,详细信息:[{}]"
,
sql
,
e
.
getMessage
());
}
finally
{
downLatch
.
countDown
();
mainLock
.
unlock
();
downLatch
.
countDown
();
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment