12
返回列表 发新帖
楼主: tolywang

[讨论] oracle data guard 相关 : LNS

[复制链接]
论坛徽章:
55
山治
日期:2017-01-03 16:19:442014年新春福章
日期:2014-05-15 10:20:51马上有钱
日期:2014-06-19 14:11:34路虎
日期:2014-06-19 14:11:34马上加薪
日期:2014-06-19 14:11:342014年新春福章
日期:2014-06-19 14:11:34马上有对象
日期:2014-02-18 16:44:082014年新春福章
日期:2014-02-18 16:44:08阿斯顿马丁
日期:2014-06-19 14:11:34问答徽章
日期:2013-11-21 09:21:29
11#
发表于 2014-1-22 00:22 | 只看该作者
tolywang 发表于 2014-1-20 18:18
是对比ASYNC 已经确定的步骤 :  log buffer 中的 redo record 被刷新了,LNS 就要读取online redo log fi ...

> 而 SYNC 的图片中是没有画 LNS 到 online redo log file 的虚线的 ,那么它从哪里读取没有读到的redo record  ?  

没有找到相关文档来阐述这个问题。不过我想从下面2个方面说说我的看法,这2个看法是建立在假设的基础上:
1. 使用 SYNC 传输redo record 的话,必须保证 log buffer 中的 redo record 在被 LNS 读取到后才能被写入到磁盘。(但是,貌似这个假设站不住脚,因为 log buffer 中的 redo record 被写入磁盘的机制有多种)
2. LNS 依然从 online redo log file 中读取 log buffer 中没有的 redo record。

使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
12#
发表于 2014-1-22 00:34 | 只看该作者
Now I have a new thought. Is it true that "由于SYNC 和 ASYNC 动作都是一样的, 所以它读取 log buffer 中的redo record 也可能被刷新而读不到"? I have some doubt about it. In SYNC mode, I suspect the log record in log buffer which LNSn need probably will never be "reused for subsequent redo generation". For it to be reused, LGWR would have to ignore LNSn (i.e. acknowledgement from the standby) and continue to do its normal work: write redo records from log buffer to log files and allow server processes to generate more redo into log buffer.

使用道具 举报

回复
论坛徽章:
71
2015年新春福章
日期:2015-03-06 11:57:312013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-01-06 13:31:18蜘蛛蛋
日期:2013-01-06 10:26:08茶鸡蛋
日期:2012-11-21 19:35:23ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07版主2段
日期:2012-05-15 15:24:11铁扇公主
日期:2012-02-21 15:02:402012新春纪念徽章
日期:2012-02-13 15:13:512012新春纪念徽章
日期:2012-02-13 15:13:51
13#
 楼主| 发表于 2014-1-26 12:31 | 只看该作者
Yong Huang 发表于 2014-1-22 00:34
Now I have a new thought. Is it true that "由于SYNC 和 ASYNC 动作都是一样的, 所以它读取 log buffer  ...

找到一些文章 :

https://community.oracle.com/message/9840135  他们好像也在讨论,<<Data Guard 11g Handbook >> 中
ASYNC写的清晰明确,SYNC 只是在imply ...

其中如下 Oracle的 PPT文档中Data Guard SYNC Transport – Maximum Availability一节有提到:
:   Remote Transport and Local Log File Write Occur in Parallel , 应该是说 SYNC模式下,
写本地online redo log和 远端传输是同步并行的 。 那么应该可以说不存在 log buffer 中找
不到 redo entry 的情况。  

http://www.oracle.com/technetwork/database/features/availability/316925-175283.pdf
This one has a very nice Synchronous and Asynchronous compare.

使用道具 举报

回复
论坛徽章:
71
2015年新春福章
日期:2015-03-06 11:57:312013年新春福章
日期:2013-02-25 14:51:24双黄蛋
日期:2013-01-06 13:31:18蜘蛛蛋
日期:2013-01-06 10:26:08茶鸡蛋
日期:2012-11-21 19:35:23ITPUB 11周年纪念徽章
日期:2012-10-09 18:05:07版主2段
日期:2012-05-15 15:24:11铁扇公主
日期:2012-02-21 15:02:402012新春纪念徽章
日期:2012-02-13 15:13:512012新春纪念徽章
日期:2012-02-13 15:13:51
14#
 楼主| 发表于 2014-1-26 15:18 | 只看该作者
Yong Huang 发表于 2014-1-22 00:34
Now I have a new thought. Is it true that "由于SYNC 和 ASYNC 动作都是一样的, 所以它读取 log buffer  ...

“ For it to be reused, LGWR would have to ignore LNSn (i.e. acknowledgement from the standby) and continue to do its normal work ”


假设 LGWR读取的 redo record 在 LNS 读取时已经在 log buffer 中找不到了 (reused), LGWR 还是继续等待 LNS 返回信息, 而不是
"ignore"  LNS , 那么会发生什么情况呢  ?  

LNS 需要(假设)从online redo log中读取 redo record (因为没地方可以读到了) ,   还要传输到standby 上, 然后等待RFS读入Standby Redo
Log , 然会返回写入成功的信息给 LNS , 继而返回给LGWR 。  整个过程有两次 disk I/O ,  其次就是网络传输 。   相对而言, 若LNS 还是从
log buffer中读到 redo record ,  唯一的区别就是少一次 disk I/O 。   

所以猜想是不是说服力不够  ?  




使用道具 举报

回复
论坛徽章:
47
蒙奇·D·路飞
日期:2017-03-27 08:04:23马上有车
日期:2014-02-18 16:41:112014年新春福章
日期:2014-02-18 16:41:11一汽
日期:2013-09-01 20:46:27复活蛋
日期:2013-03-13 07:55:232013年新春福章
日期:2013-02-25 14:51:24ITPUB 11周年纪念徽章
日期:2012-10-09 18:03:322012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:202012新春纪念徽章
日期:2012-02-13 15:13:20
15#
发表于 2014-1-27 23:30 | 只看该作者
> 假设 LGWR读取的 redo record 在 LNS 读取时已经在 log buffer 中找不到了 (reused)

As I said, in SYNC mode, that's not possible, or "I have some doubt about it".

使用道具 举报

回复

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

TOP技术积分榜 社区积分榜 徽章 团队 统计 知识索引树 积分竞拍 文本模式 帮助
  ITPUB首页 | ITPUB论坛 | 数据库技术 | 企业信息化 | 开发技术 | 微软技术 | 软件工程与项目管理 | IBM技术园地 | 行业纵向讨论 | IT招聘 | IT文档
  ChinaUnix | ChinaUnix博客 | ChinaUnix论坛
CopyRight 1999-2011 itpub.net All Right Reserved. 北京盛拓优讯信息技术有限公司版权所有 联系我们 未成年人举报专区 
京ICP备16024965号-8  北京市公安局海淀分局网监中心备案编号:11010802021510 广播电视节目制作经营许可证:编号(京)字第1149号
  
快速回复 返回顶部 返回列表