Avoid using GP_ROLE_UNDEFINED in code
The segment role GP_ROLE_UNDEFINED should never be set, and cdbvars is guarding against that ever happening. Thus, testing for it in the code makes it look like it could indeed happen which is misleading to the reader. Remove the test and refactor the switch() to instead use an if-else clause with an assertion that maintains the same guarantee as the previous coding did. Discussion: https://github.com/greenplum-db/gpdb/pull/6423Reviewed-by: NAshwin Agrawal <aagrawal@pivotal.io>
Showing
想要评论请 注册 或 登录