'Determine if this oplog entry should be skipped.
This has the possible side effect of modifying the entry\'s namespace
and filtering fields from updates and inserts.'

def _should_skip_entry(self, entry):

    if entry.get('fromMigrate'):
        return (True, False)
    if (entry['op'] == 'n'):
        return (True, False)
    ns = entry['ns']
    if ('.' not in ns):
        return (True, False)
    coll = ns.split('.', 1)[1]
    if coll.startswith('system.'):
        return (True, False)
    if coll.endswith('.chunks'):
        return (True, False)
    is_gridfs_file = False
    if coll.endswith('.files'):
        ns = ns[:(- len('.files'))]
        if self.namespace_config.gridfs_namespace(ns):
            is_gridfs_file = True
        else:
            return (True, False)
    if (coll == '$cmd'):
        return (False, False)
    namespace = self.namespace_config.lookup(ns)
    if (namespace is None):
        LOG.debug(("OplogThread:    Skipping    oplog    entry:    '%s'    is    not    in    the    namespace    configuration." % (ns,)))
        return (True, False)
    entry['ns'] = namespace.dest_name
    if (not self.filter_oplog_entry(entry, include_fields=namespace.include_fields, exclude_fields=namespace.exclude_fields)):
        return (True, False)
    return (False, is_gridfs_file)
