Only set session has_rotated for explicit rotations on the trace chunk
close. This ensures has_rotated can distinguish between clear and
explicit rotate.
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
Change-Id: I97fac1ac2a6edc233bf1889d693f74f2d7936156
Signed-off-by: Jérémie Galarneau <jeremie.galarneau@efficios.com>
} else {
chunk_id_str = chunk_id_buf;
}
- session->has_rotated = true;
}
DBG("Rotate %" PRIu32 " streams of session \"%s\" to chunk \"%s\"",
goto end_unlock_session;
}
}
+ if (close_command.is_set &&
+ close_command.value == LTTNG_TRACE_CHUNK_COMMAND_TYPE_MOVE_TO_COMPLETED) {
+ session->has_rotated = true;
+ }
DBG("Reply chunk path on close: %s", closed_trace_chunk_path);
path_length = strlen(closed_trace_chunk_path) + 1;
if (path_length > UINT32_MAX) {