'For SYNC jobs we need to make a remote REPLICATE request to get
the remote node\'s current suffix\'s hashes and then compare to our
local suffix\'s hashes to decide which suffixes (if any) are out
of sync.
:param: the job dict, with the keys defined in ``_get_part_jobs``
:param node: the remote node dict
:returns: a (possibly empty) list of strings, the suffixes to be
synced with the remote node.'

def _get_suffixes_to_sync(self, job, node):

    remote_suffixes = None
    try:
        with Timeout(self.http_timeout):
            resp = http_connect(node['replication_ip'], node['replication_port'], node['device'], job['partition'], 'REPLICATE', '', headers=self.headers).getresponse()
        if (resp.status == HTTP_INSUFFICIENT_STORAGE):
            self.logger.error(_('%s    responded    as    unmounted'), _full_path(node, job['partition'], '', job['policy']))
        elif (resp.status != HTTP_OK):
            full_path = _full_path(node, job['partition'], '', job['policy'])
            self.logger.error(_('Invalid    response    %(resp)s    from    %(full_path)s'), {'resp': resp.status, 'full_path': full_path})
        else:
            remote_suffixes = pickle.loads(resp.read())
    except (Exception, Timeout):
        self.logger.exception(('Unable    to    get    remote    suffix    hashes    from    %r' % _full_path(node, job['partition'], '', job['policy'])))
    if (remote_suffixes is None):
        raise SuffixSyncError('Unable    to    get    remote    suffix    hashes')
    suffixes = self.get_suffix_delta(job['hashes'], job['frag_index'], remote_suffixes, node['index'])
    local_suff = self._get_hashes(job['local_dev']['device'], job['partition'], job['policy'], recalculate=suffixes)
    suffixes = self.get_suffix_delta(local_suff, job['frag_index'], remote_suffixes, node['index'])
    self.suffix_count += len(suffixes)
    return suffixes
