Commit f33d76a
committed
feat(kb): implement shared ingestion executor and simplify delete operations
Backend changes:
- Add shared thread pool _ingest_executor to prevent global thread pool exhaustion
- Implement graceful shutdown with timeout mechanism (30s) for ingestion executor
- Fix rename_collection_api cross-user data pollution by adding user_id filter
- Improve rename_collection_api transaction safety with pre-validation
- Simplify delete_document_api: remove complex UploadedFile and physical file handling
- Physical file cleanup is now handled at collection level only
Frontend changes:
- Extend IngestionResult interface with embedding_count, vector_count, warnings, failed_step
- Add toast warning when embedding_count is 0 but chunks_count > 0
- Improve error handling for both document and web ingestion with partial status warnings1 parent 3760680 commit f33d76a
3 files changed
Lines changed: 74 additions & 6 deletions
Lines changed: 32 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
37 | 39 | | |
38 | 40 | | |
| 41 | + | |
39 | 42 | | |
40 | 43 | | |
41 | 44 | | |
| |||
349 | 352 | | |
350 | 353 | | |
351 | 354 | | |
352 | | - | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
353 | 358 | | |
354 | 359 | | |
355 | 360 | | |
356 | | - | |
357 | 361 | | |
358 | | - | |
359 | | - | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
360 | 375 | | |
361 | 376 | | |
| 377 | + | |
362 | 378 | | |
363 | 379 | | |
364 | 380 | | |
| |||
449 | 465 | | |
450 | 466 | | |
451 | 467 | | |
| 468 | + | |
| 469 | + | |
| 470 | + | |
| 471 | + | |
| 472 | + | |
| 473 | + | |
| 474 | + | |
| 475 | + | |
| 476 | + | |
| 477 | + | |
452 | 478 | | |
453 | 479 | | |
454 | 480 | | |
| |||
721 | 747 | | |
722 | 748 | | |
723 | 749 | | |
724 | | - | |
| 750 | + | |
725 | 751 | | |
726 | 752 | | |
727 | 753 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
518 | 518 | | |
519 | 519 | | |
520 | 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 | + | |
521 | 557 | | |
522 | 558 | | |
523 | 559 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
562 | 562 | | |
563 | 563 | | |
564 | 564 | | |
| 565 | + | |
| 566 | + | |
| 567 | + | |
| 568 | + | |
| 569 | + | |
| 570 | + | |
565 | 571 | | |
566 | 572 | | |
567 | 573 | | |
| |||
0 commit comments