Skip to content

Commit

Permalink
traverser: emit starttime/expiration keys for update
Browse files Browse the repository at this point in the history
Problem: While update() for match-allocate operations
emit starttime/expiration keys to comply with RV1,
update() for update-<allocate|reserve> operations
doesn't.

Modify the second update() method to comply with RV1
as well.
  • Loading branch information
dongahn committed Jun 9, 2020
1 parent cd3c95c commit c11183c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion resource/traversers/dfu_impl_update.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -531,7 +531,17 @@ int dfu_impl_t::update (vtx_t root, std::shared_ptr<match_writers_t> &writers,
needs = static_cast<unsigned int>(m_graph_db->metadata
.v_rt_edges[dom].get_needs ());
m_color.reset ();
return (upd_dfv (root, writers, needs, x, jobmeta, false, dfu) > 0)? 0: -1;

if ( (rc = upd_dfv (root, writers, needs, x, jobmeta, false, dfu)) > 0) {
uint64_t starttime = jobmeta.at;
uint64_t endtime = jobmeta.at + jobmeta.duration;
if (writers->emit_tm (starttime, endtime) == -1) {
m_err_msg += __FUNCTION__;
m_err_msg += ": emit_tm returned -1.\n";
}
}

return (rc > 0)? 0: -1;
}

int dfu_impl_t::remove (vtx_t root, int64_t jobid)
Expand Down

0 comments on commit c11183c

Please sign in to comment.