Oplog.py 文件源码

python
阅读 32 收藏 0 点赞 0 评论 0

项目:mongodb_consistent_backup 作者: Percona-Lab 项目源码 文件源码
def open(self):
        if not self._oplog:
            try:
                logging.debug("Opening oplog file %s" % self.oplog_file)
                if self.do_gzip:
                    self._oplog  = GzipFile(self.oplog_file, self.file_mode)
                else:
                    self._oplog = open(self.oplog_file, self.file_mode)
            except Exception, e:
                logging.fatal("Error opening oplog file %s! Error: %s" % (self.oplog_file, e))
                raise OperationError(e)
        return self._oplog
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号