Commit ebca7ef5 authored by Ramon Nou's avatar Ramon Nou
Browse files

Cleaning up expanded sources before getting more of them

parent 5f0a3d9d
Loading
Loading
Loading
Loading
Loading
+3 −0
Original line number Diff line number Diff line
@@ -244,6 +244,9 @@ master_server::ftio_scheduling_ult() {

        LOGGER_INFO("Checking if there is work to do in {}",
                    m_pending_transfer.m_sources);
        m.pending_transfer.m_expanded_sources = {};
        m.pending_transfer.m_expanded_targets = {};
        
        transfer_dataset_internal(m_pending_transfer);
        // This launches the workers to do the work...
        // We wait until this transfer is finished
+40 −27
Original line number Diff line number Diff line
@@ -248,11 +248,23 @@ struct fmt::formatter<cargo::transfer_message> : formatter<std::string_view> {
    template <typename FormatContext>
    auto
    format(const cargo::transfer_message& r, FormatContext& ctx) const {
        if(r.input_path().size() > 10) {
            const std::vector<std::string> cut_input{r.input_path().begin(),
                                 r.input_path().begin() + 10};
            const std::vector<std::string> cut_output{r.output_path().begin(),
                                  r.output_path().begin() + 10};
            const auto str = fmt::format(
                    "{{tid: {}, seqno: {}, input_path (size {}): {}, output_path (size {}): {}}}",
                    r.tid(), r.seqno(), r.input_path().size(), cut_input, r.output_path().size(), cut_output);
            return formatter<std::string_view>::format(str, ctx);

        } else {
            const auto str = fmt::format(
                    "{{tid: {}, seqno: {}, input_path: {}, output_path: {}}}",
                    r.tid(), r.seqno(), r.input_path(), r.output_path());
            return formatter<std::string_view>::format(str, ctx);
        }
    }
};


@@ -267,11 +279,12 @@ struct fmt::formatter<cargo::status_message> : formatter<std::string_view> {
                        ? fmt::format(
                                  "{{tid: {}, seqno: {}, name: {}, state: {}, bw: {}, "
                                  "error_code: {}}}",
                                  s.tid(), s.seqno(), s.name(), s.state(), s.bw(),
                                  *s.error_code())
                                  s.tid(), s.seqno(), s.name(), s.state(),
                                  s.bw(), *s.error_code())
                        : fmt::format(
                                  "{{tid: {}, seqno: {}, name: {}, state: {}, bw: {}}}",
                                  s.tid(), s.seqno(), s.name(), s.state(), s.bw());
                                  s.tid(), s.seqno(), s.name(), s.state(),
                                  s.bw());
        return formatter<std::string_view>::format(str, ctx);
    }
};