You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@trafficserver.apache.org by danobi <gi...@git.apache.org> on 2015/11/04 08:34:07 UTC
[GitHub] trafficserver pull request: Log rotation fixes
GitHub user danobi opened a pull request:
https://github.com/apache/trafficserver/pull/320
Log rotation fixes
Fixed coverity & clang-analyzer issues
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/danobi/trafficserver log-rotation-fixes
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/trafficserver/pull/320.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #320
----
commit 7de2b96a48f54d09dfc04eaa9b382a3969be4fa9
Author: Daniel Xu <dl...@yahoo.com>
Date: 2015-11-04T06:16:03Z
TS-306: Enable log rotation for diags.log & traffic.out
Fix coverity and clang-analyzer issues
Fixed coverity issues:
1338077 1338076 1338075 1338074 1338073 1338072 1338071
commit 501927ce245d9b4e0136d4ce62b9c71038b8ca9a
Author: Daniel Xu <dl...@yahoo.com>
Date: 2015-11-04T07:28:12Z
clang-format
----
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/320#discussion_r43908535
--- Diff: proxy/logging/Log.cc ---
@@ -1242,7 +1242,15 @@ Log::flush_thread_main(void * /* args ATS_UNUSED */)
break;
}
+ int logfilefd = logfile->get_fd();
--- End diff --
I tweaked this to be moved out of the loop. If it's OK when the loop starts it will be OK every loop iteration. And in that case, we might as well depend on `check_fd` to have verified that and just use an `ink_assert` to make Coverity happy.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by danobi <gi...@git.apache.org>.
Github user danobi commented on the pull request:
https://github.com/apache/trafficserver/pull/320#issuecomment-153824370
Looks good to me
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on the pull request:
https://github.com/apache/trafficserver/pull/320#issuecomment-153761311
Reviewing now. Looks good overall.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on the pull request:
https://github.com/apache/trafficserver/pull/320#issuecomment-153797825
Dan, here's my current version of this PR - https://github.com/SolidWallOfCode/trafficserver/tree/pr/320
I have to head to lunch now.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/320#discussion_r43909560
--- Diff: proxy/shared/DiagsConfig.cc ---
@@ -281,7 +281,8 @@ DiagsConfig::DiagsConfig(const char *filename, const char *tags, const char *act
////////////////////////////////////////////////////////////////////
if (!use_records) {
- diags = new Diags(tags, actions, NULL);
+ diags_log = NULL;
--- End diff --
Allright, I see James' comment now. Based on that and the Coverity report I think the best option is to move that to a member initializer at the top of the constructor.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by danobi <gi...@git.apache.org>.
Github user danobi closed the pull request at:
https://github.com/apache/trafficserver/pull/320
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---
[GitHub] trafficserver pull request: Log rotation fixes
Posted by SolidWallOfCode <gi...@git.apache.org>.
Github user SolidWallOfCode commented on a diff in the pull request:
https://github.com/apache/trafficserver/pull/320#discussion_r43908399
--- Diff: proxy/shared/DiagsConfig.cc ---
@@ -281,7 +281,8 @@ DiagsConfig::DiagsConfig(const char *filename, const char *tags, const char *act
////////////////////////////////////////////////////////////////////
if (!use_records) {
- diags = new Diags(tags, actions, NULL);
+ diags_log = NULL;
--- End diff --
Do we have to worry about leaking here, if `diags_log` isn't already `NULL`?
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---