You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by GitBox <gi...@apache.org> on 2022/07/05 14:56:45 UTC
[GitHub] [incubator-linkis] huiyuanjjjjuice opened a new pull request, #2418: Fixed the problem that the task state could not be flipped normally when thread unsafe SimpleDateFormat was used as a global variable
huiyuanjjjjuice opened a new pull request, #2418:
URL: https://github.com/apache/incubator-linkis/pull/2418
Fixed the problem that the task state could not be flipped normally when thread unsafe SimpleDateFormat was used as a global variable
For example:
1、when a large number of tasks are submitted, the UpdateTimeMills property of the JobHistory class is incorrect because the SimpleDateFormat thread is not safe. As a result, the linkis_ps_job_history_group_history table cannot update its status properly
2、Problems can be reproduced during task stress testing
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] codecov[bot] commented on pull request #2418: Fixed the problem that the task state could not be flipped normally when thread unsafe SimpleDateFormat was used as a global variable
Posted by GitBox <gi...@apache.org>.
codecov[bot] commented on PR #2418:
URL: https://github.com/apache/incubator-linkis/pull/2418#issuecomment-1175182955
# [Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/2418?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) Report
> Merging [#2418](https://codecov.io/gh/apache/incubator-linkis/pull/2418?src=pr&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (685f0e7) into [dev-1.2.0](https://codecov.io/gh/apache/incubator-linkis/commit/b4627300e2dc80ff3031a5d8140cb34c26941cba?el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) (b462730) will **decrease** coverage by `0.00%`.
> The diff coverage is `100.00%`.
```diff
@@ Coverage Diff @@
## dev-1.2.0 #2418 +/- ##
===============================================
- Coverage 17.82% 17.82% -0.01%
Complexity 1076 1076
===============================================
Files 595 595
Lines 17667 17668 +1
Branches 2635 2635
===============================================
Hits 3150 3150
- Misses 14092 14093 +1
Partials 425 425
```
| [Impacted Files](https://codecov.io/gh/apache/incubator-linkis/pull/2418?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation) | Coverage Δ | |
|---|---|---|
| [...org/apache/linkis/jobhistory/util/QueryUtils.scala](https://codecov.io/gh/apache/incubator-linkis/pull/2418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLXB1YmxpYy1lbmhhbmNlbWVudHMvbGlua2lzLXB1YmxpY3NlcnZpY2UvbGlua2lzLWpvYmhpc3Rvcnkvc3JjL21haW4vc2NhbGEvb3JnL2FwYWNoZS9saW5raXMvam9iaGlzdG9yeS91dGlsL1F1ZXJ5VXRpbHMuc2NhbGE=) | `22.22% <100.00%> (+1.09%)` | :arrow_up: |
| [...s/scheduler/queue/fifoqueue/FIFOUserConsumer.scala](https://codecov.io/gh/apache/incubator-linkis/pull/2418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWNvbW1vbnMvbGlua2lzLXNjaGVkdWxlci9zcmMvbWFpbi9zY2FsYS9vcmcvYXBhY2hlL2xpbmtpcy9zY2hlZHVsZXIvcXVldWUvZmlmb3F1ZXVlL0ZJRk9Vc2VyQ29uc3VtZXIuc2NhbGE=) | `35.55% <0.00%> (-2.23%)` | :arrow_down: |
| [...s/manager/engineplugin/jdbc/ConnectionManager.java](https://codecov.io/gh/apache/incubator-linkis/pull/2418/diff?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation#diff-bGlua2lzLWVuZ2luZWNvbm4tcGx1Z2lucy9qZGJjL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9saW5raXMvbWFuYWdlci9lbmdpbmVwbHVnaW4vamRiYy9Db25uZWN0aW9uTWFuYWdlci5qYXZh) | `43.12% <0.00%> (+0.47%)` | :arrow_up: |
------
[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/2418?src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-linkis/pull/2418?src=pr&el=footer&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Last update [b462730...685f0e7](https://codecov.io/gh/apache/incubator-linkis/pull/2418?src=pr&el=lastupdated&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=The+Apache+Software+Foundation).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong commented on a diff in pull request #2418: Fixed the problem that the task state could not be flipped normally when thread unsafe SimpleDateFormat was used as a global variable
Posted by GitBox <gi...@apache.org>.
peacewong commented on code in PR #2418:
URL: https://github.com/apache/incubator-linkis/pull/2418#discussion_r914371775
##########
linkis-engineconn-plugins/spark/src/main/scala/org/apache/linkis/engineplugin/spark/imexport/CsvRelation.scala:
##########
@@ -56,8 +56,14 @@ class CsvRelation(@transient private val source: Map[String, Any]) extends Seria
val quote = LoadData.getMapValue[String](source, "quote", "\"")
val escape = LoadData.getMapValue[String](source, "escape", "\\")
val escapeQuotes = LoadData.getMapValue[Boolean](source, "escapeQuotes", false)
- val dateFormat: SimpleDateFormat = new SimpleDateFormat(LoadData.getMapValue[String](source, "dateFormat", "yyyy-MM-dd"), Locale.US)
- val timestampFormat: SimpleDateFormat = new SimpleDateFormat(LoadData.getMapValue[String](source, "timestampFormat", "yyyy-mm-dd hh:mm:ss"), Locale.US)
+
+ private val dateFormatLocal = new ThreadLocal[SimpleDateFormat]() {
Review Comment:
dateFormatLocal can be removed
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] huiyuanjjjjuice commented on pull request #2418: Fixed the problem that the task state could not be flipped normally when thread unsafe SimpleDateFormat was used as a global variable
Posted by GitBox <gi...@apache.org>.
huiyuanjjjjuice commented on PR #2418:
URL: https://github.com/apache/incubator-linkis/pull/2418#issuecomment-1175161533
#2414
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org
[GitHub] [incubator-linkis] peacewong merged pull request #2418: Fixed the problem that the task state could not be flipped normally when thread unsafe SimpleDateFormat was used as a global variable
Posted by GitBox <gi...@apache.org>.
peacewong merged PR #2418:
URL: https://github.com/apache/incubator-linkis/pull/2418
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org