Commit 1167c20e authored by Ramon Nou's avatar Ramon Nou
Browse files

Merge branch 'tarraf/metric_collection' into 'master'

fixed buffer overflow during large files writes


See merge request !268
parents 1e50c30a 0b5d877d
Loading
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -65,14 +65,14 @@ public:
     * actually sent
     */
    struct msgpack_data {
        uint32_t flush_t_;
        uint64_t flush_t_;
        std::string hostname_;
        int pid_;
        std::string io_type_;
        std::vector<uint32_t> start_t_{};
        std::vector<uint32_t> end_t_{};
        std::vector<uint32_t> req_size_{};
        uint32_t total_bytes_{};
        std::vector<uint64_t> start_t_{};
        std::vector<uint64_t> end_t_{};
        std::vector<uint64_t> req_size_{};
        uint64_t total_bytes_{};
        int total_iops_{0};

        template <class T>
+2 −0
Original line number Diff line number Diff line
@@ -94,6 +94,8 @@ ClientMetrics::~ClientMetrics() {
    if(flush_thread_.joinable())
        flush_thread_.join();
    if(flush_type_ == client_metric_flush_type::socket) {
        // flush before closing
        flush_msgpack();
        zmq_flush_socket_->close();
        zmq_flush_context_->close();
    }