Commit 0d50abb
committed
Bug#37023549 (1/5) Improve NdbApi SPJ scan protocol timeout handling
Backport to 7.6
Add error insert to SPJ to allow a 'hard' timeout + failure to
close to be simulated.
Change-Id: Ie2479be2496ff4eb8ebe32547d8a8cb513708d26
Bug#37023549 (2/5) Improve NdbApi SPJ scan protocol timeout handling
Add SPJ scan testing
SPJ scans are added to the test as they have a different implementation
in the API and so need to be covered separately.
Due to bugs in SPJ, this test causes data node failure without
further fixes.
Change-Id: I1b7dd00a3bbaaa88aaf689de2ffc617afd041f62
Bug#37023549 (3/5) Improve NdbApi SPJ scan protocol timeout handling
Modify TC to disconnect bad APIs
TC detects in many cases when an API sends a signal which is
unexpected due the state discovered on an ApiConnectRecord.
Some cases are understood and expected, and others are not,
resulting in assertion failures in TC -> data node failure.
These can be useful for finding logic errors but can have
a large impact on users.
This patch modifies TC to handle some of these situations
differently :
- Log information about the mismatch
- Disconnect the API(s) involved
(API sending the signal, API owning the ConnectRecord)
This will result in :
- The API(s) being disconnected by all data nodes
- API failure handling on all data nodes performing cleanup
of the API's transaction objects, continuing with commit
or rollback + then releasing them
- APIs having to reinitialise their connection state to
the cluster.
API disconnect + reconnect is generally less work, quicker
and less risky for system availability than a data node
restart.
This change in functionality is tested to some extent by
the SPJ timeout scenario in ndb_scan_protocol_timeout, but
other situations leading to state mismatch may exist.
Change-Id: Id88df14141983b4fef71e74ce275d6b4e26c6c58
Bug#37023549 (4/5) Improve NdbApi SPJ scan protocol timeout handling
On timeout, make SPJ API mark scans as needing close
SPJ API is aligned to the (fixed) behaviour of NdbApi on protocol
timeout handling - marking scans as needing close at the kernel.
This causes close() to attempt to close the scan, which will
succeed in cases where the scan has timed out due to LOAD.
Additionally, SPJ API is modified to log when these protocol
timeout handling paths are used, and what the result is.
The SPJ tests in ndb_scan_protocol_timeout for the 'LOAD' case
now pass with no leaks, but the BUG case needs a further fix.
Change-Id: I90e4421228f3db9c2de1de7ebb48ae81123abf68
Bug#37023549 (5/5) Improve NdbApi SPJ scan protocol timeout handling
SPJ Timeout Release on Close timeout
In the case where there is a timeout attempting to close an SPJ scan
at the kernel, this patch sets the ReleaseOnClose variable so that
the kernel side ApiConnectRecord will not be reused.
This aligns with the normal scan behaviour in the close-failed-timeout
case.
The ndb_scan_protocol_timeout testcase result is updated with the
expected results for SPJ scan timeouts due to load + bugs
Change-Id: I04b199759415c3e0d8f6f6546551c0271fac768c1 parent ec67f49 commit 0d50abb
File tree
7 files changed
+325
-52
lines changed- mysql-test/suite/ndb
- r
- t
- storage/ndb/src
- kernel/blocks
- dbspj
- dbtc
- ndbapi
7 files changed
+325
-52
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
307 | 371 | | |
308 | 372 | | |
309 | 373 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2 | 2 | | |
3 | 3 | | |
4 | 4 | | |
| 5 | + | |
5 | 6 | | |
6 | 7 | | |
7 | 8 | | |
| |||
37 | 38 | | |
38 | 39 | | |
39 | 40 | | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
40 | 47 | | |
41 | 48 | | |
42 | 49 | | |
| |||
45 | 52 | | |
46 | 53 | | |
47 | 54 | | |
48 | | - | |
49 | | - | |
50 | | - | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
51 | 58 | | |
52 | 59 | | |
53 | 60 | | |
| |||
441 | 448 | | |
442 | 449 | | |
443 | 450 | | |
| 451 | + | |
| 452 | + | |
| 453 | + | |
| 454 | + | |
| 455 | + | |
| 456 | + | |
| 457 | + | |
| 458 | + | |
| 459 | + | |
| 460 | + | |
| 461 | + | |
| 462 | + | |
| 463 | + | |
| 464 | + | |
| 465 | + | |
| 466 | + | |
| 467 | + | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
| 478 | + | |
| 479 | + | |
| 480 | + | |
| 481 | + | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
| 485 | + | |
| 486 | + | |
| 487 | + | |
| 488 | + | |
| 489 | + | |
| 490 | + | |
| 491 | + | |
| 492 | + | |
| 493 | + | |
| 494 | + | |
| 495 | + | |
| 496 | + | |
| 497 | + | |
| 498 | + | |
| 499 | + | |
| 500 | + | |
| 501 | + | |
| 502 | + | |
| 503 | + | |
| 504 | + | |
| 505 | + | |
| 506 | + | |
| 507 | + | |
| 508 | + | |
| 509 | + | |
| 510 | + | |
| 511 | + | |
| 512 | + | |
| 513 | + | |
| 514 | + | |
| 515 | + | |
| 516 | + | |
| 517 | + | |
| 518 | + | |
| 519 | + | |
| 520 | + | |
| 521 | + | |
| 522 | + | |
| 523 | + | |
| 524 | + | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
| 559 | + | |
| 560 | + | |
| 561 | + | |
| 562 | + | |
| 563 | + | |
| 564 | + | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
| 571 | + | |
| 572 | + | |
| 573 | + | |
| 574 | + | |
| 575 | + | |
| 576 | + | |
| 577 | + | |
| 578 | + | |
| 579 | + | |
| 580 | + | |
| 581 | + | |
| 582 | + | |
| 583 | + | |
| 584 | + | |
| 585 | + | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
| 590 | + | |
| 591 | + | |
| 592 | + | |
| 593 | + | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
| 599 | + | |
| 600 | + | |
| 601 | + | |
| 602 | + | |
| 603 | + | |
| 604 | + | |
| 605 | + | |
| 606 | + | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
| 612 | + | |
| 613 | + | |
444 | 614 | | |
445 | 615 | | |
446 | 616 | | |
| |||
469 | 639 | | |
470 | 640 | | |
471 | 641 | | |
472 | | - | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
| 41 | + | |
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | | - | |
| 2 | + | |
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| |||
3758 | 3758 | | |
3759 | 3759 | | |
3760 | 3760 | | |
| 3761 | + | |
| 3762 | + | |
| 3763 | + | |
| 3764 | + | |
| 3765 | + | |
| 3766 | + | |
| 3767 | + | |
| 3768 | + | |
| 3769 | + | |
3761 | 3770 | | |
3762 | 3771 | | |
3763 | 3772 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2051 | 2051 | | |
2052 | 2052 | | |
2053 | 2053 | | |
2054 | | - | |
| 2054 | + | |
| 2055 | + | |
| 2056 | + | |
2055 | 2057 | | |
2056 | 2058 | | |
2057 | | - | |
2058 | 2059 | | |
2059 | 2060 | | |
2060 | 2061 | | |
| |||
0 commit comments