-
Notifications
You must be signed in to change notification settings - Fork 852
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve error message when adding data nodes #3494
Conversation
712d3e6
to
80c1813
Compare
Codecov Report
@@ Coverage Diff @@
## master #3494 +/- ##
==========================================
- Coverage 90.71% 90.70% -0.02%
==========================================
Files 212 212
Lines 36266 36268 +2
==========================================
- Hits 32898 32896 -2
- Misses 3368 3372 +4
Continue to review full report at Codecov.
|
80c1813
to
6fed90e
Compare
tsl/src/hypertable.c
Outdated
@@ -164,7 +165,12 @@ hypertable_get_and_validate_data_nodes(ArrayType *nodearr) | |||
ereport(ERROR, | |||
(errcode(ERRCODE_TS_INSUFFICIENT_NUM_DATA_NODES), | |||
errmsg("no data nodes can be assigned to the hypertable"), | |||
errhint("Add data nodes to the database."))); | |||
errdetail(nodearr == NULL && list_length(all_data_nodes) == 0 ? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Small nitpick, in the code there are 3 consecutive uses of list_length(all_data_nodes)
and 2 consecutive uses of (nodearr == NULL && list_length(all_data_nodes) == 0)
It would be easier to read if it was something like:
int num_all_data_nodes = list_length(all_data_nodes);
bool permission_error = !(nodearr == NULL && num_all_data_nodes == 0);
The same thing happens in line 153 where we use list_length(data_nodes);
when we already have num_data_nodes
set. We could fix that as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not think that num_all_data_nodes
is easier to read than list_length(all_data_nodes)
, they are pretty much equivalent.
6fed90e
to
08b63ff
Compare
tsl/test/expected/data_node.out
Outdated
NOTICE: 3 of 3 data nodes not used by this hypertable due to lack of permissions | ||
HINT: Grant USAGE on data nodes to attach them to a hypertable. | ||
ERROR: no data nodes can be assigned to the hypertable | ||
DETAIL: Data nodes existed, but none had USAGE privilege. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am wondering if "Data nodes exist, but none have USAGE privilege" is better than the above?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, that is better. Fixed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Apart from the one comment about which sentence might be better.
When data nodes are added but are missing USAGE privileges, a hint will be shown suggesting to add more data nodes. This is misleading since data nodes are added. Instead, if there are data nodes but they are not used, the hint will be to fix the privileges for the data nodes. Fixes timescale#3479
08b63ff
to
c63c8a1
Compare
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade since it is needed to support PostgreSQL 12.8 and 13.4. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3468 Fix crash while tracking alter table commands * timescale#3494 Improve error message when adding data nodes * timescale#3498 Fix continuous agg bgw job failure for PG 12.8 and 13.4 **Thanks** * @brianbenns for reporting a segfault with continuous aggregates
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade. The release fixes continous aggregate refresh for postgres 12.8 and 13.4, a crash with ALTER TABLE commands and a crash with continuous aggregates with HAVING clause. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3462 Fix crash while tracking alter table commands * timescale#3489 Fix continuous agg bgw job failure for PG 12.8 and 13.4 * timescale#3494 Improve error message when adding data nodes **Thanks** * @brianbenns for reporting a segfault with continuous aggregates * @brianbenns for reporting a segfault with continuous aggregates * @usego for reporting an issue with continuous aggregate refresh on PG 13.4
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade. The release fixes continous aggregate refresh for postgres 12.8 and 13.4, a crash with ALTER TABLE commands and a crash with continuous aggregates with HAVING clause. **Bugfixes** * #3430 Fix havingqual processing for continuous aggregates * #3468 Disable tests by default if tools are not found * #3462 Fix crash while tracking alter table commands * #3489 Fix continuous agg bgw job failure for PG 12.8 and 13.4 * #3494 Improve error message when adding data nodes **Thanks** * @brianbenns for reporting a segfault with continuous aggregates * @brianbenns for reporting a segfault with continuous aggregates * @usego for reporting an issue with continuous aggregate refresh on PG 13.4
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade. The release fixes continous aggregate refresh for postgres 12.8 and 13.4, a crash with ALTER TABLE commands and a crash with continuous aggregates with HAVING clause. **Bugfixes** * timescale#3430 Fix havingqual processing for continuous aggregates * timescale#3468 Disable tests by default if tools are not found * timescale#3462 Fix crash while tracking alter table commands * timescale#3489 Fix continuous agg bgw job failure for PG 12.8 and 13.4 * timescale#3494 Improve error message when adding data nodes **Thanks** * @brianbenns for reporting a segfault with continuous aggregates * @brianbenns for reporting a segfault with continuous aggregates * @usego for reporting an issue with continuous aggregate refresh on PG 13.4
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade. The release fixes continous aggregate refresh for postgres 12.8 and 13.4, a crash with ALTER TABLE commands and a crash with continuous aggregates with HAVING clause. **Bugfixes** * #3430 Fix havingqual processing for continuous aggregates * #3468 Disable tests by default if tools are not found * #3462 Fix crash while tracking alter table commands * #3489 Fix continuous agg bgw job failure for PG 12.8 and 13.4 * #3494 Improve error message when adding data nodes **Thanks** * @brianbenns for reporting a segfault with continuous aggregates * @usego for reporting an issue with continuous aggregate refresh on PG 13.4
This release contains bug fixes since the 2.4.0 release. We deem it high priority to upgrade. The release fixes continous aggregate refresh for postgres 12.8 and 13.4, a crash with ALTER TABLE commands and a crash with continuous aggregates with HAVING clause. **Bugfixes** * #3430 Fix havingqual processing for continuous aggregates * #3468 Disable tests by default if tools are not found * #3462 Fix crash while tracking alter table commands * #3489 Fix continuous agg bgw job failure for PG 12.8 and 13.4 * #3494 Improve error message when adding data nodes **Thanks** * @brianbenns for reporting a segfault with continuous aggregates * @brianbenns for reporting a segfault with continuous aggregates * @usego for reporting an issue with continuous aggregate refresh on PG 13.4
When data nodes are added but are missing USAGE privileges, a hint will
be shown suggesting to add more data nodes. This is misleading since
data nodes are added. Instead, if there are data nodes but they are not
used, the hint will be to fix the privileges for the data nodes.
Fixes #3479