[
https://issues.apache.org/jira/browse/TS-682?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13002198#comment-13002198
]
Leif Hedstrom commented on TS-682:
----------------------------------
I think for now, we'll go with a safer approach, and not fix the weird
numbering scheme of partitions. E.g.
{code}
diff --git a/iocore/cache/Cache.cc b/iocore/cache/Cache.cc
index 8dd7f88..4ddd830 100644
--- a/iocore/cache/Cache.cc
+++ b/iocore/cache/Cache.cc
@@ -166,14 +166,14 @@ int64_t
cache_bytes_used(int partition)
{
uint64_t used = 0;
- int start, end;
+ int start = 0; // These defaults are for partition 0 or partition 1 (with
partition.config)
+ int end = 1;
if (-1 == partition) {
- start = 0;
end = gnpart;
- } else {
- start = partition;
- end = partition + 1;
+ } else if (partition > 1) { // Special case when partition.config is used
+ start = partition -1;
+ end = partition;
}
for (int i = start; i < end; i++) {
{code}
> traffic_server segfaults when when partitions are setup in partition.config
> ---------------------------------------------------------------------------
>
> Key: TS-682
> URL: https://issues.apache.org/jira/browse/TS-682
> Project: Traffic Server
> Issue Type: Bug
> Reporter: Igor Brezac
> Assignee: Leif Hedstrom
> Priority: Critical
> Fix For: 2.1.7
>
> Attachments: partition.diff
>
>
--
This message is automatically generated by JIRA.
-
For more information on JIRA, see: http://www.atlassian.com/software/jira