Improve documentation on Batch - Task integration, especially regarding datasource and transactionManagers

オープン
#945 コメント 0 件 リアクション 1 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
35/100
issue の種類
ドキュメント
明瞭さ
説明が足りない
活発さ
停滞
技術スタック
java, spring, spring-boot

調査の方向性

まず、Spring Cloud Task Batch 統合ドキュメントと、リンクされている Data Flow および spring-cloud-task のサンプルパスを比較し、datasource と transaction manager の設定に焦点を当てます。BatchAutoConfiguration と SimpleTaskAutoConfiguration の想定される関係、JobConfiguration が transaction manager をどのように選択すべきか、そしてサンプルで複数のデータベース接続をどのように表現すべきかを文書化します。

索引モデルが issue の本文から書いたものです。

説明

Despite this and this, the outdated samples and the newer samples (later one seems to pass green because for some reason SimpleTaskAutoConfiguration is configuring the beans after JobConfiguration injections), I can't find a clear documentation on how we should combine Spring Batch and Spring Task at low level, which seems to be the scenario for the majority of user base, considering the issues section.

  • Is desirable that both Batch (BatchAutoconfiguration) and Task (SimpleTasAutoconfiguration) reuse same datasource and transactionmanager?
  • If no, which one should we use in JobConfiguration new API, that requires to pass transactionManager to create a tasklet or a chunklet?
  • If yes, why is DefaultTaskConfigurer creating a TransactionManager from the @Primary datasource regardless any potential @Primary transactionManager
  • Shouldn't the samples as defined right now fail on duplicate bean in JobConfiguration when trying to inject the @Primary transactionManager? In an scenario where defaults are provided, both DatasourceTransactionManager and SimpleTaskAutconfiguration expose a PlatformTransactionManager

The scenario gets even more tricky if the domain/logical part of the task also uses a database connection, so we need yet another datasource.

Thanks for all your amazing work so far, mates!!

主要言語
Java
スター
446
フォーク
310
平均マージ
18時間 18分
マージ済み PR(30日)
6

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

spring-cloud/spring-cloud-task のほかの issue

spring-cloud/spring-cloud-task の issue をすべて見る

似ている issue

Java の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。