You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@dubbo.apache.org by "khanimteyaz (GitHub)" <gi...@apache.org> on 2018/12/27 09:29:29 UTC

[GitHub] [incubator-dubbo] khanimteyaz opened pull request #3080: Simple date format each time new object creation removed

## What is the purpose of the change
AcceLogFilter message creation and last and current check was performing by each time simple date formate object creation. In this version of code I have use the ThreadLocal for each thread wise to create simple date format object instead of each call

https://github.com/apache/incubator-dubbo/issues/3026


This PR is a resurrection of old 3027 (https://github.com/apache/incubator-dubbo/pull/3027) PR

Sorry for the inconvenience 
## Brief changelog

XXXXX

## Verifying this change

Runnig UT and verifying generated access log.

Follow this checklist to help us incorporate your contribution quickly and easily:

- [x] Make sure there is a [GITHUB_issue] (https://github.com/apache/incubator-dubbo/issues/3026) field for the change (usually before you start working on it). Trivial changes like typos do not require a GITHUB issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
- [ ] Format the pull request title like `[Dubbo-XXX] Fix UnknownException when host config not exist #XXX`. Each commit in the pull request should have a meaningful subject line and body.
- [ ] Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
- [ ] Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add integration-test in [test module](https://github.com/apache/incubator-dubbo/tree/master/dubbo-test).
- [ ] Run `mvn clean install -DskipTests=false` & `mvn clean test-compile failsafe:integration-test` to make sure unit-test and integration-test pass.
- [ ] If this contribution is large, please follow the [Software Donation Guide](https://github.com/apache/incubator-dubbo/wiki/Software-donation-guide).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] khanimteyaz commented on pull request #3080: Simple date format each time new object creation removed

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
done.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] khanimteyaz commented on issue #3080: Simple date format each time new object creation removed

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
> Hi, @khanimteyaz
> Nice work.
> Your approach is completely in line with my vision. I will review it.

@carryxyh thanks.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] khanimteyaz commented on issue #3080: Simple date format each time new object creation removed

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@carryxyh  It seems my rebase has introduce lots of commits of others, so raising another PR.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on pull request #3080: Simple date format each time new object creation removed

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
How about move this to AccessLogData's constructor?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #3080: Simple date format each time new object creation removed

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Hi, @khanimteyaz 
Nice work. 
Your approach is completely in line with my vision. I will review it.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] khanimteyaz commented on issue #3080: Simple date format each time new object creation removed

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
@carryxyh I have raised the PR again for the issue #3026  and have closed the old #3027. 

As suggested I have moved the log message creating and writing to single threaded model so that single instance of **SimpleDateFormat** can be used.

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] carryxyh commented on issue #3080: Simple date format each time new object creation removed

Posted by "carryxyh (GitHub)" <gi...@apache.org>.
Would u pls rebase master to fix ci failed?

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org


[GitHub] [incubator-dubbo] codecov-io commented on issue #3080: Simple date format each time new object creation removed

Posted by "codecov-io (GitHub)" <gi...@apache.org>.
# [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3080?src=pr&el=h1) Report
> :exclamation: No coverage uploaded for pull request base (`master@9c0e3ef`). [Click here to learn what that means](https://docs.codecov.io/docs/error-reference#section-missing-base-commit).
> The diff coverage is `79.44%`.

[![Impacted file tree graph](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/graphs/tree.svg?width=650&token=VnEIkiFQT0&height=150&src=pr)](https://codecov.io/gh/apache/incubator-dubbo/pull/3080?src=pr&el=tree)

```diff
@@            Coverage Diff            @@
##             master    #3080   +/-   ##
=========================================
  Coverage          ?   63.59%           
  Complexity        ?       75           
=========================================
  Files             ?      654           
  Lines             ?    28311           
  Branches          ?     4817           
=========================================
  Hits              ?    18004           
  Misses            ?     8040           
  Partials          ?     2267
```


| [Impacted Files](https://codecov.io/gh/apache/incubator-dubbo/pull/3080?src=pr&el=tree) | Coverage Δ | Complexity Δ | |
|---|---|---|---|
| [...tadata/store/redis/RedisMetadataReportFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tbWV0YWRhdGEtcmVwb3J0L2R1YmJvLW1ldGFkYXRhLXJlcG9ydC1yZWRpcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vbWV0YWRhdGEvc3RvcmUvcmVkaXMvUmVkaXNNZXRhZGF0YVJlcG9ydEZhY3RvcnkuamF2YQ==) | `100% <ø> (ø)` | `0 <0> (?)` | |
| [...ompatibleReferenceAnnotationBeanPostProcessor.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tY29tcGF0aWJsZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vY29uZmlnL3NwcmluZy9iZWFucy9mYWN0b3J5L2Fubm90YXRpb24vQ29tcGF0aWJsZVJlZmVyZW5jZUFubm90YXRpb25CZWFuUG9zdFByb2Nlc3Nvci5qYXZh) | `0% <ø> (ø)` | `0 <0> (?)` | |
| [...ory/annotation/CompatibleReferenceBeanBuilder.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tY29tcGF0aWJsZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vY29uZmlnL3NwcmluZy9iZWFucy9mYWN0b3J5L2Fubm90YXRpb24vQ29tcGF0aWJsZVJlZmVyZW5jZUJlYW5CdWlsZGVyLmphdmE=) | `0% <ø> (ø)` | `0 <0> (?)` | |
| [.../CompatibleServiceAnnotationBeanPostProcessor.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tY29tcGF0aWJsZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vY29uZmlnL3NwcmluZy9iZWFucy9mYWN0b3J5L2Fubm90YXRpb24vQ29tcGF0aWJsZVNlcnZpY2VBbm5vdGF0aW9uQmVhblBvc3RQcm9jZXNzb3IuamF2YQ==) | `0% <ø> (ø)` | `0 <0> (?)` | |
| [...ubbo/metadata/store/redis/RedisMetadataReport.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tbWV0YWRhdGEtcmVwb3J0L2R1YmJvLW1ldGFkYXRhLXJlcG9ydC1yZWRpcy9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vbWV0YWRhdGEvc3RvcmUvcmVkaXMvUmVkaXNNZXRhZGF0YVJlcG9ydC5qYXZh) | `80% <ø> (ø)` | `0 <0> (?)` | |
| [...va/org/apache/dubbo/config/RegistryDataConfig.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tY29uZmlnL2R1YmJvLWNvbmZpZy1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL2NvbmZpZy9SZWdpc3RyeURhdGFDb25maWcuamF2YQ==) | `38.46% <ø> (ø)` | `0 <0> (?)` | |
| [...apache/dubbo/rpc/cluster/router/tag/TagRouter.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL3RhZy9UYWdSb3V0ZXIuamF2YQ==) | `33.33% <0%> (ø)` | `0 <0> (?)` | |
| [.../dubbo/metadata/identifier/MetadataIdentifier.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tbWV0YWRhdGEtcmVwb3J0L2R1YmJvLW1ldGFkYXRhLXJlcG9ydC1hcGkvc3JjL21haW4vamF2YS9vcmcvYXBhY2hlL2R1YmJvL21ldGFkYXRhL2lkZW50aWZpZXIvTWV0YWRhdGFJZGVudGlmaWVyLmphdmE=) | `46.51% <0%> (ø)` | `0 <0> (?)` | |
| [...e/dubbo/registry/integration/RegistryProtocol.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tcmVnaXN0cnkvZHViYm8tcmVnaXN0cnktYXBpL3NyYy9tYWluL2phdmEvb3JnL2FwYWNoZS9kdWJiby9yZWdpc3RyeS9pbnRlZ3JhdGlvbi9SZWdpc3RyeVByb3RvY29sLmphdmE=) | `82.06% <100%> (ø)` | `0 <0> (?)` | |
| [...bbo/rpc/cluster/router/file/FileRouterFactory.java](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree#diff-ZHViYm8tY2x1c3Rlci9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvZHViYm8vcnBjL2NsdXN0ZXIvcm91dGVyL2ZpbGUvRmlsZVJvdXRlckZhY3RvcnkuamF2YQ==) | `77.77% <100%> (ø)` | `0 <0> (?)` | |
| ... and [5 more](https://codecov.io/gh/apache/incubator-dubbo/pull/3080/diff?src=pr&el=tree-more) | |

------

[Continue to review full report at Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3080?src=pr&el=continue).
> **Legend** - [Click here to learn more](https://docs.codecov.io/docs/codecov-delta)
> `Δ = absolute <relative> (impact)`, `ø = not affected`, `? = missing data`
> Powered by [Codecov](https://codecov.io/gh/apache/incubator-dubbo/pull/3080?src=pr&el=footer). Last update [9c0e3ef...09390e2](https://codecov.io/gh/apache/incubator-dubbo/pull/3080?src=pr&el=lastupdated). Read the [comment docs](https://docs.codecov.io/docs/pull-request-comments).


[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org

[GitHub] [incubator-dubbo] khanimteyaz closed pull request #3080: Simple date format each time new object creation removed

Posted by "khanimteyaz (GitHub)" <gi...@apache.org>.
[ pull request closed by khanimteyaz ]

[ Full content available at: https://github.com/apache/incubator-dubbo/pull/3080 ]
This message was relayed via gitbox.apache.org for notifications@dubbo.apache.org