Skip to content
Snippets Groups Projects
Commit d17d0376 authored by Cedric CAFFY's avatar Cedric CAFFY
Browse files

Added symbolic link to the /var/tmp/cta-rados-locking.log file

parent dd3b0cbe
No related branches found
No related tags found
No related merge requests found
...@@ -24,6 +24,11 @@ mkdir /var/log/tmp ...@@ -24,6 +24,11 @@ mkdir /var/log/tmp
chmod 1777 /var/log/tmp chmod 1777 /var/log/tmp
echo '/var/log/tmp/%h-%t-%e-%p-%s.core' > /proc/sys/kernel/core_pattern echo '/var/log/tmp/%h-%t-%e-%p-%s.core' > /proc/sys/kernel/core_pattern
# Creating the Rados performance locking file
touch /var/log/cta-rados-locking.log
#Creating the symbolic link to /var/log/cta-rados-locking.log
ln -s /var/log/cta-rados-locking.log /var/tmp/cta-rados-locking.log
echo -n "Fixing reverse DNS for $(hostname) for xrootd: " echo -n "Fixing reverse DNS for $(hostname) for xrootd: "
sed -i -c "s/^\($(hostname -i)\)\s\+.*$/\1 $(hostname -s).$(grep search /etc/resolv.conf | cut -d\ -f2) $(hostname -s)/" /etc/hosts sed -i -c "s/^\($(hostname -i)\)\s\+.*$/\1 $(hostname -s).$(grep search /etc/resolv.conf | cut -d\ -f2) $(hostname -s)/" /etc/hosts
echo "DONE" echo "DONE"
......
...@@ -719,7 +719,9 @@ void BackendRados::lockBackoff(std::string name, uint64_t timeout_us, LockType l ...@@ -719,7 +719,9 @@ void BackendRados::lockBackoff(std::string name, uint64_t timeout_us, LockType l
size_t backoff=1; size_t backoff=1;
utils::Timer t, timeoutTimer; utils::Timer t, timeoutTimer;
RadosLockTimingLogger::Measurements timingMeasurements; RadosLockTimingLogger::Measurements timingMeasurements;
uint64_t nbTriesToLock = 0;
while (true) { while (true) {
nbTriesToLock++;
TIMESTAMPEDPRINT(lockType==LockType::Shared?"Pre-lock (shared)":"Pre-lock (exclusive)"); TIMESTAMPEDPRINT(lockType==LockType::Shared?"Pre-lock (shared)":"Pre-lock (exclusive)");
RadosTimeoutLogger rtl; RadosTimeoutLogger rtl;
if (lockType==LockType::Shared) { if (lockType==LockType::Shared) {
...@@ -745,7 +747,7 @@ void BackendRados::lockBackoff(std::string name, uint64_t timeout_us, LockType l ...@@ -745,7 +747,7 @@ void BackendRados::lockBackoff(std::string name, uint64_t timeout_us, LockType l
} }
if (-EBUSY != rc) break; if (-EBUSY != rc) break;
if (timeout_us && (timeoutTimer.usecs() > (int64_t)timeout_us)) { if (timeout_us && (timeoutTimer.usecs() > (int64_t)timeout_us)) {
throw exception::Exception("In BackendRados::lockBackoff(): timeout : timeout set = "+std::to_string(timeout_us)+"usec, time to lock the object : "+std::to_string(timeoutTimer.usecs())+"usec"); throw exception::Exception("In BackendRados::lockBackoff(): timeout : timeout set = "+std::to_string(timeout_us)+" usec, time to lock the object : "+std::to_string(timeoutTimer.usecs())+" usec, number of tries to lock = "+std::to_string(nbTriesToLock));
} }
timespec ts; timespec ts;
auto latencyUsecs=t.usecs(); auto latencyUsecs=t.usecs();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment