Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Non-Retryable requests when transactions are being used?

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

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

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
48/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
静か
技術スタック
java
領域
databases

調査の方向性

OkHttpServices.sendRequestWithRetry とその呼び出し元、特に headImplExec と DocumentManagerImpl.exists から始め、スタックトレースとトランザクション引数をエントリーポイントとして使用します。既存のリトライ動作と、一時的なサービス障害に対するテストを確認します。リトライの判断で通信エラーとトランザクション処理を区別し、トランザクション exists リクエストを回帰テストでカバーできれば完了です。

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

説明

Bug

We run our integration tests in gitlab in a dockerized environment, and since we started to use MarkLogic server transactions more we noticed our tests behaving increasingly flaky. We suspect the dockerized environment to induce some connection and availability issues. Here is a stacktrace of one of the issues:

com.marklogic.client.FailedRetryException: Service unavailable and maximum retry period elapsed: 0 seconds after 0 retries
	at com.marklogic.client.impl.OkHttpServices.sendRequestWithRetry(OkHttpServices.java:576)
	at com.marklogic.client.impl.OkHttpServices.headImplExec(OkHttpServices.java:1054)
	at com.marklogic.client.impl.OkHttpServices.headImpl(OkHttpServices.java:1016)
	at com.marklogic.client.impl.OkHttpServices.head(OkHttpServices.java:972)
	at com.marklogic.client.impl.DocumentManagerImpl.exists(DocumentManagerImpl.java:145)

The code leading into this trace is supposed to check, whether a document exists and looks like this:

final DocumentDescriptor documentDescriptor = manager.exists(docUri.toString(), transaction);

The transaction is non-null in the above statement. And as it turns out the OkHttpServices in line 1054:

return sendRequestWithRetry(requestBldr, (transaction == null), doHeadFunction, null);

renders a request using a transaction being "not retryable".

In a distributed system communication errors can happen, regardless of whether a transaction is being used or not. There should be a destinction being made depending on the type of error, whether it makes sense to repeat a request. The existence of a transaction should not make a difference here.

(We are currently using the marklogic-java-client in version 8.0.0 and the Markogic Server in 11.3.1)

主要言語
Java
スター
61
フォーク
74
平均マージ
2日 53分
マージ済み PR(30日)
8

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

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

はじめの一歩

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

marklogic/java-client-api のほかの issue

marklogic/java-client-api の issue をすべて見る

似ている issue

Java の issue をもっと見る

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

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