Make ReportRemoteError's CONTEXT style-compliant

There's not a ton of documentation about what CONTEXT lines should look
like, but this seems like the most dominant pattern. Similarly, users
should expect lowercase, non-period strings.
pull/552/head
Jason Petersen 2016-06-07 12:28:29 -06:00
parent 9ba02928ac
commit 48f4e5d1a5
No known key found for this signature in database
GPG Key ID: 9F1D3510D110ABA9
5 changed files with 12 additions and 12 deletions

View File

@ -298,7 +298,7 @@ ReportRemoteError(PGconn *connection, PGresult *result, bool raiseError)
messageDetail ? errdetail("%s", messageDetail) : 0,
messageHint ? errhint("%s", messageHint) : 0,
messageContext ? errcontext("%s", messageContext) : 0,
errcontext("Error occurred on remote connection to %s:%s.",
errcontext("while executing command on %s:%s",
nodeName, nodePort)));
}
}

View File

@ -141,11 +141,11 @@ ERROR: relation "lineitem_orderkey_index" already exists
CREATE INDEX try_index ON lineitem USING gist (l_orderkey);
WARNING: data type bigint has no default operator class for access method "gist"
HINT: You must specify an operator class for the index or define a default operator class for the data type.
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
ERROR: could not execute DDL command on worker node shards
CREATE INDEX try_index ON lineitem (non_existent_column);
WARNING: column "non_existent_column" does not exist
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
ERROR: could not execute DDL command on worker node shards
CREATE INDEX ON lineitem (l_orderkey);
ERROR: creating index without a name on a distributed table is currently unsupported

View File

@ -151,12 +151,12 @@ INSERT INTO limit_orders VALUES (18811, 'BUD', 14962, '2014-04-05 08:32:16', 'se
-5.00);
ERROR: new row for relation "limit_orders_750000" violates check constraint "limit_orders_limit_price_check"
DETAIL: Failing row contains (18811, BUD, 14962, 2014-04-05 08:32:16, sell, -5.00).
CONTEXT: Error occurred on remote connection to localhost:57637.
CONTEXT: while executing command on localhost:57637
-- INSERT violating primary key constraint
INSERT INTO limit_orders VALUES (32743, 'LUV', 5994, '2001-04-16 03:37:28', 'buy', 0.58);
ERROR: duplicate key value violates unique constraint "limit_orders_pkey_750001"
DETAIL: Key (id)=(32743) already exists.
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
SET client_min_messages TO DEFAULT;
-- commands with non-constant partition values are unsupported
INSERT INTO limit_orders VALUES (random() * 100, 'ORCL', 152, '2011-08-25 11:50:45',
@ -270,7 +270,7 @@ INSERT INTO limit_orders VALUES (275, 'ADR', 140, '2007-07-02 16:32:15', 'sell',
INSERT INTO limit_orders VALUES (275, 'ADR', 140, '2007-07-02 16:32:15', 'sell', 43.67);
ERROR: duplicate key value violates unique constraint "limit_orders_pkey_750001"
DETAIL: Key (id)=(275) already exists.
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
-- Test that shards which miss a modification are marked unhealthy
-- First: Connect to the second worker node
\c - - - :worker_2_port
@ -281,7 +281,7 @@ DROP TABLE limit_orders_750000;
-- Fourth: Perform an INSERT on the remaining node
INSERT INTO limit_orders VALUES (276, 'ADR', 140, '2007-07-02 16:32:15', 'sell', 43.67);
WARNING: relation "limit_orders_750000" does not exist
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
-- Last: Verify the insert worked but the deleted placement is now unhealthy
SELECT count(*) FROM limit_orders WHERE id = 276;
count

View File

@ -262,7 +262,7 @@ NOTICE: relation "non_existent_table" does not exist, skipping
ALTER TABLE IF EXISTS lineitem_alter ALTER COLUMN int_column2 SET DATA TYPE INTEGER;
ALTER TABLE lineitem_alter DROP COLUMN non_existent_column;
WARNING: column "non_existent_column" of relation "lineitem_alter_220000" does not exist
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
ERROR: could not execute DDL command on worker node shards
ALTER TABLE lineitem_alter DROP COLUMN IF EXISTS non_existent_column;
NOTICE: column "non_existent_column" of relation "lineitem_alter" does not exist, skipping
@ -362,15 +362,15 @@ DETAIL: Only ADD|DROP COLUMN, SET|DROP NOT NULL, SET|DROP DEFAULT and TYPE subc
-- types
ALTER TABLE lineitem_alter ADD COLUMN new_column non_existent_type;
WARNING: type "non_existent_type" does not exist
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
ERROR: could not execute DDL command on worker node shards
ALTER TABLE lineitem_alter ALTER COLUMN null_column SET NOT NULL;
WARNING: column "null_column" contains null values
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
ERROR: could not execute DDL command on worker node shards
ALTER TABLE lineitem_alter ALTER COLUMN l_partkey SET DEFAULT 'a';
WARNING: invalid input syntax for integer: "a"
CONTEXT: Error occurred on remote connection to localhost:57638.
CONTEXT: while executing command on localhost:57638
ERROR: could not execute DDL command on worker node shards
-- Verify that we error out on statements involving RENAME
ALTER TABLE lineitem_alter RENAME TO lineitem_renamed;

View File

@ -456,7 +456,7 @@ COPY customer_worker_copy_append FROM '@abs_srcdir@/data/customer.2.data' with (
-- Test if there is no relation to copy data with the worker copy
COPY lineitem_copy_none FROM '@abs_srcdir@/data/lineitem.1.data' with (delimiter '|', master_host 'localhost', master_port 57636);
WARNING: relation "lineitem_copy_none" does not exist
CONTEXT: Error occurred on remote connection to localhost:57636.
CONTEXT: while executing command on localhost:57636
ERROR: could not run copy from the worker node
-- Connect back to the master node
\c - - - 57636