多事务并发调用CSNManager::GetNextCSN(),导致争用

Hi, 各位大佬,又来麻烦大家了,最近在看MOT事务协议的代码,再次感谢一下Vinoth关于CSN的指点, 对比silo论文,发现OpenGauss在通过有效性确认后,调用CSNManager::GetNextCSN()生成全局唯一CSN, 然而这个实现,并发事务线程都会尝试原子性地对CSNManager::m_csn加1,它是个所有事务共享的变量,这不就带来(事务线程间的)争用(contention)了吗? OpenGauss的代码,好像并没有采用silo的设计 ――通过Epoch,各事务独立生成TID,以避免争用?或者是这种争用微不足道? 谢谢 新大陆软件 秦浩 mobile: 17625988619 e-mail:qinhao@newland.com.cn

Hi, CSNManager::GetNextCSN() doesn't introduce any significant contention. We have not observed any problems with that. Regards, Vinoth ________________________________ From: qinhao@newland.com.cn <qinhao@newland.com.cn> Sent: Wednesday, June 15, 2022 9:13 AM To: community <community@opengauss.org> Subject: [Community] ����������CSNManager::GetNextCSN()���������� Hi, ��λ���У������鷳����ˣ�����ڿ�MOT����Э��Ĵ��룬�ٴθ�лһ��Vinoth����CSN��ָ�㣬 �Ա�silo���ģ�����OpenGauss��ͨ����Ч��ȷ�Ϻ���CSNManager::GetNextCSN()����ȫ��ΨһCSN�� Ȼ�����ʵ�֣����������̶߳��᳢��ԭ���Եض�CSNManager::m_csn��1�����Ǹ������������ı������ⲻ�ʹ����������̼߳�ģ����ã�contention������ OpenGauss�Ĵ��룬����û�в���silo����� �D�Dͨ��Epoch���������������TID���Ա������ã���������������������� лл �´�½���� �غ� mobile: 17625988619 e-mail:qinhao@newland.com.cn _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org

I see, thank you Vinoth. �´�½���� �غ� mobile: 17625988619 e-mail:qinhao@newland.com.cn �����ˣ� Vinoth Veeraraghavan ����ʱ�䣺 2022-06-22 10:41 �ռ��ˣ� qinhao@newland.com.cn; community ���⣺ Re: [Community] ����������CSNManager::GetNextCSN()���������� Hi, CSNManager::GetNextCSN() doesn't introduce any significant contention. We have not observed any problems with that. Regards, Vinoth From: qinhao@newland.com.cn <qinhao@newland.com.cn> Sent: Wednesday, June 15, 2022 9:13 AM To: community <community@opengauss.org> Subject: [Community] ����������CSNManager::GetNextCSN()���������� Hi, ��λ���У������鷳����ˣ�����ڿ�MOT����Э��Ĵ��룬�ٴθ�лһ��Vinoth����CSN��ָ�㣬 �Ա�silo���ģ�����OpenGauss��ͨ����Ч��ȷ�Ϻ���CSNManager::GetNextCSN()����ȫ��ΨһCSN�� Ȼ�����ʵ�֣����������̶߳��᳢��ԭ���Եض�CSNManager::m_csn��1�����Ǹ������������ı������ⲻ�ʹ����������̼߳�ģ����ã�contention������ OpenGauss�Ĵ��룬����û�в���silo����� �D�Dͨ��Epoch���������������TID���Ա������ã���������������������� лл �´�½���� �غ� mobile: 17625988619 e-mail:qinhao@newland.com.cn _______________________________________________ Community mailing list -- community@opengauss.org To unsubscribe send an email to community-leave@opengauss.org
participants (2)
-
qinhao@newland.com.cn
-
Vinoth Veeraraghavan