Skip to content

Commit

Permalink
Create a tunable for default cache timeout
Browse files Browse the repository at this point in the history
Under valgrind, its trivial to make the default cache timeouts hit
frequently - make this adjustable so stress tests can succeed.

Additionally, add a few helper RPMs for debugging under valgrind.
  • Loading branch information
bbockelm committed Nov 27, 2024
1 parent 7f72c4b commit 62a2854
Show file tree
Hide file tree
Showing 6 changed files with 17 additions and 0 deletions.
1 change: 1 addition & 0 deletions config/resources/defaults.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Director:
CachePresenceTTL: 1m
CachePresenceCapacity: 10000
Cache:
DefaultCacheTimeout: "9.5s"
Port: 8442
SelfTest: true
SelfTestInterval: 15s
Expand Down
10 changes: 10 additions & 0 deletions docs/parameters.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1249,6 +1249,16 @@ type: int
default: 0
components: ["cache"]
---
name: Cache.DefaultCacheTimeout
description: |+
The default value of the cache operation timeout if one is not specified by the client.
Newer clients should always specify a timeout; changing this default is rarely necessary.
type: duration
default: 9.5s
hidden: true
components: ["cache"]
---
############################
# Director-level configs #
############################
Expand Down
1 change: 1 addition & 0 deletions images/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ RUN yum install -y --enablerepo=osg-testing goreleaser npm xrootd-devel xrootd-s
xrdcl-http jq procps docker make curl-devel java-17-openjdk-headless git cmake3 gcc-c++ openssl-devel sqlite-devel libcap-devel sssd-client \
xrootd-multiuser \
zlib-devel \
vim valgrind gdb gtest-devel \
&& yum clean all

# The ADD command with a api.github.com URL in the next couple of sections
Expand Down
1 change: 1 addition & 0 deletions param/parameters.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions param/parameters_struct.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions xrootd/launch.go
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,8 @@ func makeUnprivilegedXrootdLauncher(daemonName string, configPath string, isCach
if confDir := os.Getenv("XRD_PLUGINCONFDIR"); confDir != "" {
result.ExtraEnv = append(result.ExtraEnv, "XRD_PLUGINCONFDIR="+confDir)
}
result.ExtraEnv = append(result.ExtraEnv, "XRD_PELICANFEDERATIONMETADATATIMEOUT="+param.Cache_DefaultCacheTimeout.GetDuration().String())
result.ExtraEnv = append(result.ExtraEnv, "XRD_PELICANDEFAULTHEADERTIMEOUT="+param.Cache_DefaultCacheTimeout.GetDuration().String())
}
return
}
Expand Down

0 comments on commit 62a2854

Please sign in to comment.