[Groonga-commit] groonga/groonga at 9ac390a [master] doc: add request_timeout

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Apr 5 18:09:43 JST 2016


Kouhei Sutou	2016-04-05 18:09:43 +0900 (Tue, 05 Apr 2016)

  New Revision: 9ac390a5663f2121ec5d0223f017ede159fa8830
  https://github.com/groonga/groonga/commit/9ac390a5663f2121ec5d0223f017ede159fa8830

  Message:
    doc: add request_timeout

  Added files:
    doc/source/reference/command/request_timeout.rst
  Modified files:
    doc/files.am
    doc/locale/ja/LC_MESSAGES/reference.po
    doc/source/reference/command.rst

  Modified: doc/files.am (+4 -0)
===================================================================
--- doc/files.am    2016-04-05 17:46:15 +0900 (ef57bc1)
+++ doc/files.am    2016-04-05 18:09:43 +0900 (e178982)
@@ -675,6 +675,7 @@ absolute_source_files = \
 	$(top_srcdir)/doc/source/reference/command/output_format.rst \
 	$(top_srcdir)/doc/source/reference/command/pretty_print.rst \
 	$(top_srcdir)/doc/source/reference/command/request_id.rst \
+	$(top_srcdir)/doc/source/reference/command/request_timeout.rst \
 	$(top_srcdir)/doc/source/reference/command/return_code.rst \
 	$(top_srcdir)/doc/source/reference/commands/cache_limit.rst \
 	$(top_srcdir)/doc/source/reference/commands/check.rst \
@@ -1506,6 +1507,7 @@ source_files_relative_from_doc_dir = \
 	source/reference/command/output_format.rst \
 	source/reference/command/pretty_print.rst \
 	source/reference/command/request_id.rst \
+	source/reference/command/request_timeout.rst \
 	source/reference/command/return_code.rst \
 	source/reference/commands/cache_limit.rst \
 	source/reference/commands/check.rst \
@@ -1855,6 +1857,7 @@ html_files_relative_from_locale_dir = \
 	html/_sources/reference/command/output_format.txt \
 	html/_sources/reference/command/pretty_print.txt \
 	html/_sources/reference/command/request_id.txt \
+	html/_sources/reference/command/request_timeout.txt \
 	html/_sources/reference/command/return_code.txt \
 	html/_sources/reference/commands/cache_limit.txt \
 	html/_sources/reference/commands/check.txt \
@@ -2104,6 +2107,7 @@ html_files_relative_from_locale_dir = \
 	html/reference/command/output_format.html \
 	html/reference/command/pretty_print.html \
 	html/reference/command/request_id.html \
+	html/reference/command/request_timeout.html \
 	html/reference/command/return_code.html \
 	html/reference/commands/cache_limit.html \
 	html/reference/commands/check.html \

  Modified: doc/locale/ja/LC_MESSAGES/reference.po (+103 -12)
===================================================================
--- doc/locale/ja/LC_MESSAGES/reference.po    2016-04-05 17:46:15 +0900 (566b1e2)
+++ doc/locale/ja/LC_MESSAGES/reference.po    2016-04-05 18:09:43 +0900 (716407e)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 1.2.1\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2016-03-30 21:54+0900\n"
+"PO-Revision-Date: 2016-04-05 18:09+0900\n"
 "Last-Translator: Masafumi Yokoyama <yokoyama �� clear-code.com>\n"
 "Language-Team: Japanese\n"
 "Language: ja\n"
@@ -3465,6 +3465,82 @@ msgstr "以下は ``id-1`` というIDをリクエストに割り当てる例で
 msgid ":doc:`/reference/commands/request_cancel`"
 msgstr ""
 
+msgid "Request timeout"
+msgstr "リクエストタイムアウト"
+
+# fa33df3be0a649509ae60b55405e9f61
+msgid "You can set timeout to each request."
+msgstr "各リクエストにタイムアウトを設定できます。"
+
+msgid ""
+"If a request isn't completed until the specified timeout, the request is "
+"canceled. If you don't set timeout, the request is processed until the "
+"request is completed."
+msgstr ""
+"指定したタイムアウトまでにリクエストが完了しなかった場合、そのリクエストは"
+"キャンセルされます。タイムアウトを設定しない場合、そのリクエストが完了するま"
+"で処理をします。"
+
+msgid ""
+"Request timeout feature is useful when you implement timeout on client side. "
+"If you only implement timeout only on client side, the request keeps "
+"processing after client stops waiting response. It uses needless resources. "
+"If you set timeout to the request, the request will be canceled soon."
+msgstr ""
+"リクエストタイムアウト機能はクライアントサイドでタイムアウトを実装していると"
+"きに有用です。もし、クライアントサイドだけでタイムアウトを実装していると、ク"
+"ライアントがレスポンスを待つことをやめたあともリクエストを処理し続けます。こ"
+"れは不必要にリソースを消費しています。このリクエストにタイムアウトを設定して"
+"いれば、じきにこのリクエストはキャンセルされます。"
+
+# fa33df3be0a649509ae60b55405e9f61
+msgid "How to set timeout to request"
+msgstr "リクエストにタイムアウトを設定する方法"
+
+# 09584728ab8241ef8082ca2cdf80d59c
+msgid ""
+"All commands accept ``request_timeout`` parameter. You can set timeout to "
+"request by adding ``request_timeout`` parameter."
+msgstr ""
+"すべてのコマンドは ``request_timeout`` パラメーターを受け付けます。 "
+"``request_timeout`` パラメーターを追加することでリクエストにタイムアウトを設"
+"定できます。"
+
+msgid ""
+"Unit of timeout out value is second. You can set timeout less than 1 second "
+"by using decimal such as ``0.1``. ``0.1`` means 100 milliseconds."
+msgstr ""
+"タイムアウト値の単位は秒です。 ``0.1`` のように小数で指定することで1秒未満の"
+"タイムアウトを設定できます。 ``0.1`` は100ミリ秒のタイムアウトという意味で"
+"す。"
+
+msgid "Here is an example to set ``5.5`` seconds timeout to a request::"
+msgstr "以下はリクエストに ``5.5`` 秒のタイムアウトを設定する例です。::"
+
+msgid "Return code on timeout"
+msgstr "タイムアウト時のリターンコード"
+
+msgid ""
+"If the request is timed out, ``GRN_CANCEL`` (``-77``) :doc:`return_code` is "
+"returned in response header."
+msgstr ""
+"リクエストがタイムアウトすると、レスポンスヘッダーの :doc:`return_code` は "
+"``GRN_CANCEL`` ( ``-77`` )になります。"
+
+msgid "Here is an example response on timeout::"
+msgstr "以下はタイムアウト時にレスポンス例です。::"
+
+msgid "See :doc:`/reference/command/output_format` for response header."
+msgstr ""
+"レスポンスヘッダーについては :doc:`/reference/command/output_format` を参照し"
+"てください。"
+
+msgid ":doc:`/reference/command/return_code`"
+msgstr ""
+
+msgid ":doc:`/reference/command/output_format`"
+msgstr ""
+
 msgid "Return code"
 msgstr "リターンコード"
 
@@ -3719,6 +3795,24 @@ msgstr ""
 msgid "-71: ``GRN_UNSUPPORTED_COMMAND_VERSION``"
 msgstr ""
 
+msgid "-72: ``GRN_NORMALIZER_ERROR``"
+msgstr ""
+
+msgid "-73: ``GRN_TOKEN_FILTER_ERROR``"
+msgstr ""
+
+msgid "-74: ``GRN_COMMAND_ERROR``"
+msgstr ""
+
+msgid "-75: ``GRN_PLUGIN_ERROR``"
+msgstr ""
+
+msgid "-76: ``GRN_SCORER_ERROR``"
+msgstr ""
+
+msgid "-77: ``GRN_CANCEL``"
+msgstr ""
+
 msgid ""
 ":doc:`output_format` shows where return code is appeared in query API "
 "response."
@@ -12591,9 +12685,6 @@ msgstr ""
 msgid ":doc:`/reference/tokenizers`"
 msgstr ""
 
-msgid ":doc:`/reference/command/output_format`"
-msgstr ""
-
 msgid "``table_list``"
 msgstr ""
 
@@ -16521,19 +16612,19 @@ msgid ""
 "``prefix_rk_search`` selects records by :doc:`/reference/operations/"
 "prefix_rk_search`."
 msgstr ""
-"``prefix_rk_search`` は :doc:`/reference/operations/prefix_rk_search` を"
-"使ってレコードを選択します。"
+"``prefix_rk_search`` は :doc:`/reference/operations/prefix_rk_search` を使っ"
+"てレコードを選択します。"
 
 msgid "You need to create :ref:`table-pat-key` table for prefix RK search."
 msgstr ""
 "前方一致RK検索を使うには :ref:`table-pat-key` テーブルを作る必要があります。"
 
 msgid ""
-"You can't use ``prefix_rk_search`` for sequential scan. It's a selector "
-"only procedure."
+"You can't use ``prefix_rk_search`` for sequential scan. It's a selector only "
+"procedure."
 msgstr ""
-"シーケンシャルスキャンでは ``prefix_rk_search`` を使うことはできません。こ"
-"れはセレクターのみのプロシージャです。"
+"シーケンシャルスキャンでは ``prefix_rk_search`` を使うことはできません。これ"
+"はセレクターのみのプロシージャです。"
 
 msgid ""
 "``prefix_rk_search`` requires two arguments. They are ``column`` and "
@@ -16548,10 +16639,10 @@ msgid "``query`` must be string."
 msgstr "``query`` は文字列です。"
 
 msgid ""
-"Here is the simple usage of ``prefix_rk_search`` function which selects ``"
+"Here is the simple usage of ``prefix_rk_search()`` function which selects ``"
 "ニホン`` and ``ニッポン`` by ``ni``:"
 msgstr ""
-"以下は簡単な ``prefix_rk_search`` 関数の使い方です。この使い方では ``ni`` "
+"以下は簡単な ``prefix_rk_search()`` 関数の使い方です。この使い方では ``ni`` "
 "で ``ニホン`` と ``ニッポン`` を検索しています。"
 
 msgid ""

  Modified: doc/source/reference/command.rst (+1 -0)
===================================================================
--- doc/source/reference/command.rst    2016-04-05 17:46:15 +0900 (f753658)
+++ doc/source/reference/command.rst    2016-04-05 18:09:43 +0900 (7f0b04c)
@@ -18,5 +18,6 @@ This section describes about command and built-in commands.
    command/output_format
    command/pretty_print
    command/request_id
+   command/request_timeout
    command/return_code
    commands/*

  Added: doc/source/reference/command/request_timeout.rst (+63 -0) 100644
===================================================================
--- /dev/null
+++ doc/source/reference/command/request_timeout.rst    2016-04-05 18:09:43 +0900 (76f0073)
@@ -0,0 +1,63 @@
+.. -*- rst -*-
+
+.. highlightlang:: none
+
+Request timeout
+===============
+
+Summary
+-------
+
+.. versionadded:: 6.0.2
+
+You can set timeout to each request.
+
+If a request isn't completed until the specified timeout, the request
+is canceled. If you don't set timeout, the request is processed until
+the request is completed.
+
+Request timeout feature is useful when you implement timeout on client
+side. If you only implement timeout only on client side, the request
+keeps processing after client stops waiting response. It uses needless
+resources. If you set timeout to the request, the request will be
+canceled soon.
+
+How to set timeout to request
+-----------------------------
+
+All commands accept ``request_timeout`` parameter. You can set timeout
+to request by adding ``request_timeout`` parameter.
+
+Unit of timeout out value is second. You can set timeout less than 1
+second by using decimal such as ``0.1``. ``0.1`` means 100
+milliseconds.
+
+Here is an example to set ``5.5`` seconds timeout to a request::
+
+  select Users --request_timeout 5.5
+
+Return code on timeout
+----------------------
+
+If the request is timed out, ``GRN_CANCEL`` (``-77``)
+:doc:`return_code` is returned in response header.
+
+Here is an example response on timeout::
+
+  [
+    [
+      -77,
+      1459846102.63304,
+      0.000220775604248047,
+      "[request-canceler] a request is canceled: <0x7fa0d5d7ed00>"
+    ]
+  ]
+
+See :doc:`/reference/command/output_format` for response header.
+
+See also
+--------
+
+* :doc:`/reference/command/return_code`
+* :doc:`/reference/command/output_format`
+* :doc:`/reference/commands/request_cancel`
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index