statement stays in "D" STATUS after "kill REQUEST_ID"
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Stado |
New
|
Undecided
|
Unassigned |
Bug Description
My test is run in windows, with 2 nodes in a postgresql database.
The client program runs insert/
Multiple clients are started.
Some client happens to stop in the "update ..." SQL.
I try to kill the SQL via "kill 587", also I kill the client.
With show statements command, I still get below info:
Stado -> show statements;
+------
| REQUEST_ID | SESSION_ID | SUBMIT_TIME | STATUS | STATEMENT | NODES | CURRENT_STEP |
+------
| 587 | 14 | 2013-06-19 10:46:55.671 | D | update info set name = '123' where id = $1 | | |
| 2001 | 19 | 2013-06-19 11:38:36.312 | E | show statements | | |
+------
2 row(s).
1. If I kill gs-cmdline, seems server will know the client connection is closed, but when I kill my client program, seems server doesn't know?
2. Why the killed statement still exists?
provide more information:
run test function, which is simplify as below:
private static void test() throws Exception{
String sql = "select * from info a, info b where a.id = ? and a.id = b.id";
pstmt = conn.prepareSta tement( sql);
for(int idx=1; idx<TIMES; idx++){ executeQuery( );
pstmt.setInt(1, idx);
pstmt.
}
pstmt.close();
}
1) with xdb.use_ load_for_ step=false config, the test runs with no problem. load_for_ step=true, there are some problems:
2) with default config xdb.use_
1. sometimes the program stops after serval queries, it does not exit, there is no exception either.
Stado -> show statements; ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +
+------
| REQUEST_ID | SESSION_ID | SUBMIT_TIME | STATUS | STATEMENT | NODES | CURRENT_STEP |
+------
| 17 | 6 | 2013-06-24 18:40:19.03 | E | show statements | | |
| 15 | 7 | 2013-06-24 18:38:45.071 | E | select * from info a, info b where a.id = $1 and a.id = b.id | | |
+------
2 row(s).
if kill the request:
Stado -> kill 15;
OK
Stado -> show statements; ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- + ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- ------- +
+------
| REQUEST_ID | SESSION_ID | SUBMIT_TIME | STATUS | STATEMENT | NODES | CURRENT_STEP |
+------
| 19 | 6 | 2013-06-24 18:40:23.45 | E | show statements | | |
| 15 | 7 | 2013-06-24 18:38:45.071 | D | select * from info a, info b where a.id = $1 and a.id = b.id | | |
+------
2 row(s).
the statement of request 15 stays in "D" status, and is not deleted even the program is terminated.
2. sometimes there is exception telling "relation TMPT**_1 already exists", and the program stops and exits.