re-dump metadata cache at the right place
authorJulien Desfossez <jdesfossez@efficios.com>
Wed, 26 Jul 2017 16:16:09 +0000 (12:16 -0400)
committerJulien Desfossez <jdesfossez@efficios.com>
Wed, 30 Aug 2017 19:29:02 +0000 (15:29 -0400)
Signed-off-by: Julien Desfossez <jdesfossez@efficios.com>
src/bin/lttng-sessiond/kernel.c
src/bin/lttng-sessiond/ust-app.c
src/common/kernel-consumer/kernel-consumer.c

index 84aa1b4e9a7e88c4800da7ab5028298f65d2fc60..ef5733c66eb2b652e66cb6c508b52183fee37429 100644 (file)
@@ -1202,11 +1202,6 @@ int kernel_rotate_session(struct ltt_session *session)
                }
                pthread_mutex_unlock(socket->lock);
        }
-       ret = kernctl_session_metadata_cache_dump(ksess->fd);
-       if (ret < 0) {
-               ERR("Dump the kernel metadata cache");
-               goto error;
-       }
 
        ret = LTTNG_OK;
 
index 7f252d53fbedd1adb83a4d046570055d84fac14d..b362d022f59abf317644ec12a909234cfcfed5de 100644 (file)
@@ -6440,8 +6440,6 @@ int ust_app_rotate_session(struct ltt_session *session)
                        if (ret < 0) {
                                goto error;
                        }
-
-                       /* TODO: regenerate metadata here instead of at the end ? */
                }
                break;
        }
@@ -6522,13 +6520,6 @@ int ust_app_rotate_session(struct ltt_session *session)
                        if (ret < 0) {
                                goto error;
                        }
-
-                       /*
-                       ret = regenerate_per_pid_metadata(usess, app, registry);
-                       if (ret < 0) {
-                               goto error;
-                       }
-                       */
                }
                break;
        }
index 4d422cc4438e805466657e40547b4736ccf905e7..401f35940a520efa4d67e6eb16da1909a862a7e8 100644 (file)
@@ -527,6 +527,16 @@ int stream_rotation(struct lttng_consumer_local_data *ctx,
                }
                stream->index_file = index_file;
                stream->out_fd_offset = 0;
+       } else {
+               /*
+                * Reset the position of what has been read from the metadata
+                * cache to 0 so we can dump it again.
+                */
+               ret = kernctl_metadata_cache_dump(stream->wait_fd);
+               if (ret < 0) {
+                       ERR("Failed to dump the metadata cache after rotation");
+                       goto error;
+               }
        }
 
        stream->rotate_position = 0;
This page took 0.032817 seconds and 5 git commands to generate.