projects
/
lttng-tools.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix: sessiond: consumer.c: rotation error handling
[lttng-tools.git]
/
src
/
bin
/
lttng-sessiond
/
rotation-thread.c
diff --git
a/src/bin/lttng-sessiond/rotation-thread.c
b/src/bin/lttng-sessiond/rotation-thread.c
index 25dbf76a932c3414f294848f2211a42e5e8659e3..3e06e93110801116d2441b59a0b1ddc13b3650ae 100644
(file)
--- a/
src/bin/lttng-sessiond/rotation-thread.c
+++ b/
src/bin/lttng-sessiond/rotation-thread.c
@@
-431,7
+431,12
@@
end:
session->rotation_pending_local = false;
}
if (ret) {
session->rotation_pending_local = false;
}
if (ret) {
- session->rotation_state = LTTNG_ROTATION_STATE_ERROR;
+ ret = session_reset_rotation_state(session,
+ LTTNG_ROTATION_STATE_ERROR);
+ if (ret) {
+ ERR("Failed to reset rotation state of session \"%s\"",
+ session->name);
+ }
}
return 0;
}
}
return 0;
}
@@
-491,14
+496,19
@@
int check_session_rotation_pending_relay(struct ltt_session *session)
ERR("[rotation-thread] Encountered an error when checking if rotation of trace archive %" PRIu64 " of session \"%s\" is pending on the relay",
session->current_archive_id - 1,
session->name);
ERR("[rotation-thread] Encountered an error when checking if rotation of trace archive %" PRIu64 " of session \"%s\" is pending on the relay",
session->current_archive_id - 1,
session->name);
- session->rotation_state = LTTNG_ROTATION_STATE_ERROR;
+ ret = session_reset_rotation_state(session,
+ LTTNG_ROTATION_STATE_ERROR);
+ if (ret) {
+ ERR("Failed to reset rotation state of session \"%s\"",
+ session->name);
+ }
rotation_completed = false;
}
rcu_read_unlock();
if (rotation_completed) {
rotation_completed = false;
}
rcu_read_unlock();
if (rotation_completed) {
- DBG("[rotation-thread]
T
otation of trace archive %" PRIu64 " of session \"%s\" is complete on the relay",
+ DBG("[rotation-thread]
R
otation of trace archive %" PRIu64 " of session \"%s\" is complete on the relay",
session->current_archive_id - 1,
session->name);
session->rotation_pending_relay = false;
session->current_archive_id - 1,
session->name);
session->rotation_pending_relay = false;
@@
-555,7
+565,12
@@
int check_session_rotation_pending(struct ltt_session *session,
/* Rename the completed trace archive's location. */
now = time(NULL);
if (now == (time_t) -1) {
/* Rename the completed trace archive's location. */
now = time(NULL);
if (now == (time_t) -1) {
- session->rotation_state = LTTNG_ROTATION_STATE_ERROR;
+ ret = session_reset_rotation_state(session,
+ LTTNG_ROTATION_STATE_ERROR);
+ if (ret) {
+ ERR("Failed to reset rotation state of session \"%s\"",
+ session->name);
+ }
ret = LTTNG_ERR_UNK;
goto end;
}
ret = LTTNG_ERR_UNK;
goto end;
}
@@
-642,7
+657,7
@@
end:
return ret;
}
return ret;
}
-/* Call with the session
lock
held. */
+/* Call with the session
and session_list locks
held. */
static
int launch_session_rotation(struct ltt_session *session)
{
static
int launch_session_rotation(struct ltt_session *session)
{
@@
-736,10
+751,9
@@
int handle_job_queue(struct rotation_thread_handle *handle,
}
session_lock(session);
}
session_lock(session);
- session_unlock_list();
-
ret = run_job(job, session, handle->notification_thread_handle);
session_unlock(session);
ret = run_job(job, session, handle->notification_thread_handle);
session_unlock(session);
+ session_unlock_list();
free(job);
if (ret) {
goto end;
free(job);
if (ret) {
goto end;
This page took
0.025002 seconds
and
4
git commands to generate.