Description
Describe the bug
When the number of BE is less than 3, create a table will set default replica_num to 3, which will cause creating a table failed. It is better to set default replica_num to the numbe of alive BE, when the numbe of BE is less than 3 and the param "replica_num" is not setted。
To Reproduce
Steps to reproduce the behavior:
- only add one BE to the system
- create a table, replica_num is not setted:
CREATE TABLE table4 ( siteid INT DEFAULT '10', citycode SMALLINT, username VARCHAR(32) DEFAULT '', pv BIGINT SUM DEFAULT '0' ) AGGREGATE KEY(siteid, citycode, username) DISTRIBUTED BY HASH(siteid) BUCKETS 10;
- See error
ERROR 1064 (HY000): errCode = 2, detailMessage = Failed to find enough host in all backends. need: 3
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Desktop (please complete the following information):
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
Smartphone (please complete the following information):
- Device: [e.g. iPhone6]
- OS: [e.g. iOS8.1]
- Browser [e.g. stock browser, safari]
- Version [e.g. 22]
Additional context
Add any other context about the problem here.
Activity