0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-09-28 19:58:53 +02:00

modules/client/sync: Enable linear sync.

This commit is contained in:
Jason Volk 2019-02-27 15:25:26 -08:00
parent f91f6226a6
commit 902466450e

View file

@ -134,7 +134,7 @@ ircd::m::sync::handle_get(client &client,
range.first > range.second?
false:
range.second - range.first <= size_t(linear_delta_max)?
polylog_handle(data):
linear_handle(data):
polylog_handle(data)
};
@ -301,7 +301,6 @@ namespace ircd::m::sync
static bool linear_proffer_event_one(data &);
static size_t linear_proffer_event(data &, const mutable_buffer &);
static event::idx linear_proffer(data &, window_buffer &);
static void linear_rewrite(data &, const json::vector &);
}
bool
@ -338,13 +337,13 @@ try
{
json::stack::member
{
*data.out, "next_batch", json::value
top, "next_batch", json::value
{
lex_cast(last+1), json::STRING
}
};
linear_rewrite(data, vector);
json::merge(top, vector);
}
else checkpoint.rollback();
@ -369,13 +368,6 @@ catch(const std::exception &e)
throw;
}
void
ircd::m::sync::linear_rewrite(data &data,
const json::vector &vector)
{
}
/// Iterates the events in the data.range and creates a json::vector in
/// the supplied window_buffer. The return value is the event_idx of the
/// last event which fit in the buffer, or 0 of nothing was of interest