minor improvement in snapbuild: use existing interface and remove fake code

Поиск
Список
Период
Сортировка
От ocean_li_996
Тема minor improvement in snapbuild: use existing interface and remove fake code
Дата
Msg-id 53dd2539.b4ec.19a92d2fe61.Coremail.ocean_li_996@163.com
обсуждение исходный текст
Ответы Re: minor improvement in snapbuild: use existing interface and remove fake code
Re: minor improvement in snapbuild: use existing interface and removefake code
Список pgsql-hackers
Hi hackers,
While reviewing the snapbuild implementation, I noticed several small changes that could improve code clarity, correctness, and reuse. 
I have prepared a patch with these modifications (attached):

1. Removed the Assert in SnapBuildGetOrBuildSnapshot(). When called from logicalmsg_decode(), this Assert may not hold, which looks like a bug.

2. In SnapBuildProcessChange(), now reuse SnapBuildGetOrBuildSnapshot() to obtain the snapshot.

3. Removed handling of SNAPBUILD_START and SNAPBUILD_BUILDING_SNAPSHOT states in SnapBuildCommitTxn(). When entering this function,
builder->state is always SNAPBUILD_FULL_SNAPSHOT or SNAPBUILD_CONSISTENT.


Looking forward to your comments.

Best regards,

Haiyang Li

Вложения

В списке pgsql-hackers по дате отправления: