You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficserver.apache.org by "Zhao Yongming (JIRA)" <ji...@apache.org> on 2011/01/15 17:19:45 UTC

[jira] Created: (TS-643) unable to purge objects on other servers in full cluster mode

unable to purge objects on other servers in full cluster mode
-------------------------------------------------------------

                 Key: TS-643
                 URL: https://issues.apache.org/jira/browse/TS-643
             Project: Traffic Server
          Issue Type: Bug
    Affects Versions: 2.1.5
         Environment: full cluster mode
            Reporter: Zhao Yongming
            Assignee: Zhao Yongming


when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.

after check the following code in Cache.cc:
Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
#ifdef CLUSTER_CACHE
  if (cache_clustering_enabled > 0) {
  }
#endif
  return caches[frag_type]->remove(cont, url, frag_type);
}

I am sure the purge in cluster is need to fix. as there is:
iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,

we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-643) unable to purge objects on other servers in full cluster mode

Posted by "Zhao Yongming (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Zhao Yongming updated TS-643:
-----------------------------

    Attachment: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch

this patch will use the api remove function, that will make PURGE request handled correctly.

tested on lastest trunk

> unable to purge objects on other servers in full cluster mode
> -------------------------------------------------------------
>
>                 Key: TS-643
>                 URL: https://issues.apache.org/jira/browse/TS-643
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: full cluster mode
>            Reporter: Zhao Yongming
>            Assignee: Zhao Yongming
>         Attachments: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch
>
>
> when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.
> after check the following code in Cache.cc:
> Action *
> CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
> {
> #ifdef CLUSTER_CACHE
>   if (cache_clustering_enabled > 0) {
>   }
> #endif
>   return caches[frag_type]->remove(cont, url, frag_type);
> }
> I am sure the purge in cluster is need to fix. as there is:
> iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,
> we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-643) unable to purge objects on other servers in full cluster mode

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986078#action_12986078 ] 

Leif Hedstrom commented on TS-643:
----------------------------------

I must be missing something, but I don't understand quite the changes in Cache.cc. You now have

Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
  Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %s", url->string_get_ref());
#ifdef CLUSTER_CACHE
  if (cache_clustering_enabled > 0) {
    INK_MD5 md5;
    int len = 0;

    url->MD5_get(&md5);
    const char *hostname = url->host_get(&len);
    return remove(cont, &md5, frag_type, true, false, (char *) hostname, len);
  }
#endif
  return caches[frag_type]->remove(cont, url, frag_type);
}


but isn't that exactly identical to 

Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
  Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %s", url->string_get_ref());
  return caches[frag_type]->remove(cont, url, frag_type);
}

As far as I can tell, the Cache::remove() method with just those three arguments does exactly the same MD5 / hostname lookups as your patch?

Action *
Cache::remove(Continuation *cont, CacheURL *url, CacheFragType type)
{
  INK_MD5 md5;
  url->MD5_get(&md5);
  int host_len = 0;
  const char *hostname = url->host_get(&host_len);
  return remove(cont, &md5, type, true, false, (char *) hostname, host_len);
}


What am I missing?

> unable to purge objects on other servers in full cluster mode
> -------------------------------------------------------------
>
>                 Key: TS-643
>                 URL: https://issues.apache.org/jira/browse/TS-643
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: full cluster mode
>            Reporter: Zhao Yongming
>            Assignee: Zhao Yongming
>         Attachments: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch
>
>
> when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.
> after check the following code in Cache.cc:
> Action *
> CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
> {
> #ifdef CLUSTER_CACHE
>   if (cache_clustering_enabled > 0) {
>   }
> #endif
>   return caches[frag_type]->remove(cont, url, frag_type);
> }
> I am sure the purge in cluster is need to fix. as there is:
> iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,
> we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Updated: (TS-643) unable to purge objects on other servers in full cluster mode

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/TS-643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leif Hedstrom updated TS-643:
-----------------------------

    Attachment: TS-643.diff

Slight cleanup, please let me know what you think. I think this simplifies the code a bit, making it less confusing what is really going on under the hood.

> unable to purge objects on other servers in full cluster mode
> -------------------------------------------------------------
>
>                 Key: TS-643
>                 URL: https://issues.apache.org/jira/browse/TS-643
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: full cluster mode
>            Reporter: Zhao Yongming
>            Assignee: Zhao Yongming
>         Attachments: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch, TS-643.diff
>
>
> when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.
> after check the following code in Cache.cc:
> Action *
> CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
> {
> #ifdef CLUSTER_CACHE
>   if (cache_clustering_enabled > 0) {
>   }
> #endif
>   return caches[frag_type]->remove(cont, url, frag_type);
> }
> I am sure the purge in cluster is need to fix. as there is:
> iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,
> we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TS-643) unable to purge objects on other servers in full cluster mode

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986112#action_12986112 ] 

Leif Hedstrom edited comment on TS-643 at 1/24/11 7:37 PM:
-----------------------------------------------------------

Ah, never mind, I see it now, your code calls CacheProcessor::remove() not Cache::remove().

      was (Author: zwoop):
    Ah, never mind, I see it now, your code calls ClusterCache::remove() not Cache::remove().
  
> unable to purge objects on other servers in full cluster mode
> -------------------------------------------------------------
>
>                 Key: TS-643
>                 URL: https://issues.apache.org/jira/browse/TS-643
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: full cluster mode
>            Reporter: Zhao Yongming
>            Assignee: Zhao Yongming
>         Attachments: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch, TS-643.diff
>
>
> when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.
> after check the following code in Cache.cc:
> Action *
> CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
> {
> #ifdef CLUSTER_CACHE
>   if (cache_clustering_enabled > 0) {
>   }
> #endif
>   return caches[frag_type]->remove(cont, url, frag_type);
> }
> I am sure the purge in cluster is need to fix. as there is:
> iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,
> we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TS-643) unable to purge objects on other servers in full cluster mode

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986112#action_12986112 ] 

Leif Hedstrom commented on TS-643:
----------------------------------

Ah, never mind, I see it now, your code calls ClusterCache::remove() not Cache::remove().

> unable to purge objects on other servers in full cluster mode
> -------------------------------------------------------------
>
>                 Key: TS-643
>                 URL: https://issues.apache.org/jira/browse/TS-643
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: full cluster mode
>            Reporter: Zhao Yongming
>            Assignee: Zhao Yongming
>         Attachments: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch
>
>
> when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.
> after check the following code in Cache.cc:
> Action *
> CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
> {
> #ifdef CLUSTER_CACHE
>   if (cache_clustering_enabled > 0) {
>   }
> #endif
>   return caches[frag_type]->remove(cont, url, frag_type);
> }
> I am sure the purge in cluster is need to fix. as there is:
> iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,
> we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Issue Comment Edited: (TS-643) unable to purge objects on other servers in full cluster mode

Posted by "Leif Hedstrom (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/TS-643?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12986078#action_12986078 ] 

Leif Hedstrom edited comment on TS-643 at 1/24/11 5:58 PM:
-----------------------------------------------------------

I must be missing something, but I don't understand quite the changes in Cache.cc. You now have

{noformat} 
Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
  Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %s", url->string_get_ref());
#ifdef CLUSTER_CACHE
  if (cache_clustering_enabled > 0) {
    INK_MD5 md5;
    int len = 0;

    url->MD5_get(&md5);
    const char *hostname = url->host_get(&len);
    return remove(cont, &md5, frag_type, true, false, (char *) hostname, len);
  }
#endif
  return caches[frag_type]->remove(cont, url, frag_type);
}
{noformat} 

but isn't that exactly identical to 

{noformat} 
Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
  Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %s", url->string_get_ref());
  return caches[frag_type]->remove(cont, url, frag_type);
}
{noformat} 

As far as I can tell, the Cache::remove() method with just those three arguments does exactly the same MD5 / hostname lookups as your patch?

{noformat} 
Action *
Cache::remove(Continuation *cont, CacheURL *url, CacheFragType type)
{
  INK_MD5 md5;
  url->MD5_get(&md5);
  int host_len = 0;
  const char *hostname = url->host_get(&host_len);
  return remove(cont, &md5, type, true, false, (char *) hostname, host_len);
}
{noformat} 

What am I missing?

      was (Author: zwoop):
    I must be missing something, but I don't understand quite the changes in Cache.cc. You now have

Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
  Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %s", url->string_get_ref());
#ifdef CLUSTER_CACHE
  if (cache_clustering_enabled > 0) {
    INK_MD5 md5;
    int len = 0;

    url->MD5_get(&md5);
    const char *hostname = url->host_get(&len);
    return remove(cont, &md5, frag_type, true, false, (char *) hostname, len);
  }
#endif
  return caches[frag_type]->remove(cont, url, frag_type);
}


but isn't that exactly identical to 

Action *
CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
{
  Debug("cache_remove", "[CacheProcessor::remove] Issuing cache delete for %s", url->string_get_ref());
  return caches[frag_type]->remove(cont, url, frag_type);
}

As far as I can tell, the Cache::remove() method with just those three arguments does exactly the same MD5 / hostname lookups as your patch?

Action *
Cache::remove(Continuation *cont, CacheURL *url, CacheFragType type)
{
  INK_MD5 md5;
  url->MD5_get(&md5);
  int host_len = 0;
  const char *hostname = url->host_get(&host_len);
  return remove(cont, &md5, type, true, false, (char *) hostname, host_len);
}


What am I missing?
  
> unable to purge objects on other servers in full cluster mode
> -------------------------------------------------------------
>
>                 Key: TS-643
>                 URL: https://issues.apache.org/jira/browse/TS-643
>             Project: Traffic Server
>          Issue Type: Bug
>    Affects Versions: 2.1.5
>         Environment: full cluster mode
>            Reporter: Zhao Yongming
>            Assignee: Zhao Yongming
>         Attachments: 0001-TS-643-fix-PURGE-of-objects-on-other-hosts--in-full-cluster-mode.patch
>
>
> when sending purge request to random hosts in cluster, if the object is not on that host, it will not be delete but send back a 200 ok request. that should be fixed.
> after check the following code in Cache.cc:
> Action *
> CacheProcessor::remove(Continuation *cont, URL *url, CacheFragType frag_type)
> {
> #ifdef CLUSTER_CACHE
>   if (cache_clustering_enabled > 0) {
>   }
> #endif
>   return caches[frag_type]->remove(cont, url, frag_type);
> }
> I am sure the purge in cluster is need to fix. as there is:
> iocore/cluster/P_ClusterInline.h:367:Cluster_remove(ClusterMachine * m, Continuation * cont, CacheKey * key,
> we should fix CacheProcessor::remove to use the Cluster_remove method in cluster mode.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.