- /*
- * Handle the case where we did not start a rotation on any channel.
- * The consumer will never wake up the rotation thread to perform the
- * rename, so we have to do it here while we hold the session and
- * session_list locks.
- */
- if (!session->kernel_session && !ust_active) {
- struct lttng_trace_archive_location *location;
-
- session->rotate_pending = false;
- session->rotation_state = LTTNG_ROTATION_STATE_COMPLETED;
- ret = rename_complete_chunk(session, now);
- if (ret < 0) {
- ERR("Failed to rename completed rotation chunk");
- goto end;
- }