Merge pull request #1233 from ywk253100/161209_replic_dead_lock

Fix sync deadlock and filter notification
This commit is contained in:
Daniel Jiang 2016-12-12 14:36:15 +08:00 committed by GitHub
commit e1b2ba0e23
3 changed files with 14 additions and 6 deletions

View File

@ -70,6 +70,10 @@ http {
proxy_buffering off;
proxy_request_buffering off;
}
location /service/notifications {
return 404;
}
}
}

View File

@ -87,6 +87,10 @@ http {
proxy_buffering off;
proxy_request_buffering off;
}
location /service/notifications {
return 404;
}
}
server {

View File

@ -164,16 +164,16 @@ func (ra *RepositoryAPI) Delete() {
}
for _, t := range tags {
if err := rc.DeleteTag(t); err != nil {
if err = rc.DeleteTag(t); err != nil {
if regErr, ok := err.(*registry_error.Error); ok {
if regErr.StatusCode != http.StatusNotFound {
if regErr.StatusCode == http.StatusNotFound {
continue
}
ra.CustomAbort(regErr.StatusCode, regErr.Detail)
}
} else {
log.Errorf("error occurred while deleting tag %s:%s: %v", repoName, t, err)
ra.CustomAbort(http.StatusInternalServerError, "internal error")
}
}
log.Infof("delete tag: %s:%s", repoName, t)
go TriggerReplicationByRepository(repoName, []string{t}, models.RepOpDelete)