[Groonga-commit] groonga/groonga at 7a5bade [master] doc: add explanation about extended recursive behavior (#938)

Back to archive index
Kentaro Hayashi null+****@clear*****
Wed Apr 17 18:08:48 JST 2019


Kentaro Hayashi	2019-04-17 18:08:48 +0900 (Wed, 17 Apr 2019)

  Revision: 7a5badee354ad9ab7cca57f0c7c53e5368544cba
  https://github.com/groonga/groonga/commit/7a5badee354ad9ab7cca57f0c7c53e5368544cba

  Message:
    doc: add explanation about extended recursive behavior (#938)
    
    * doc: add explanation about extended io_flush recursive behavior
    
    * doc: translate po
    
    * doc: fix wrong "--recursive dependent" markup
    
    * doc: reduce needless "io_flush --recursive no" operation
    
    * doc: fix markup
    
    * doc: update po
    
    * doc: fix a typo
    
    * doc: update po

  Modified files:
    doc/locale/ja/LC_MESSAGES/reference.po
    doc/source/reference/commands/io_flush.rst

  Modified: doc/locale/ja/LC_MESSAGES/reference.po (+216 -47)
===================================================================
--- doc/locale/ja/LC_MESSAGES/reference.po    2019-04-17 16:43:22 +0900 (ad76f6f13)
+++ doc/locale/ja/LC_MESSAGES/reference.po    2019-04-17 18:08:48 +0900 (fbf4cc4b6)
@@ -7,7 +7,7 @@ msgid ""
 msgstr ""
 "Project-Id-Version: 1.2.1\n"
 "Report-Msgid-Bugs-To: \n"
-"PO-Revision-Date: 2019-04-05 16:04+0900\n"
+"PO-Revision-Date: 2019-04-17 17:50+0900\n"
 "Last-Translator: Masafumi Yokoyama <yokoy****@clear*****>\n"
 "Language-Team: Japanese\n"
 "Language: ja\n"
@@ -6557,6 +6557,15 @@ msgstr "すべての引数は省略可能です::"
 msgid ":ref:`io-flush-only-opened` is added."
 msgstr ":ref:`io-flush-only-opened` が追加されました。"
 
+msgid ""
+"``--recursive dependent`` option is added. It is recommended way to flush "
+"target object and its related objects since 9.0.2. See :ref:`io-flush-"
+"recursive` about details."
+msgstr ""
+"``--recursive dependent`` が追加されました。9.0.2以降で対象のオブジェクトを書"
+"き出すのにおすすめの方法です。オプションの詳細は :ref:`io-flush-recursive` を"
+"参照してください。"
+
 msgid "You can flush all changes in memory to disk with no arguments:"
 msgstr ""
 "引数無しで実行するとメモリー上のすべての変更をディスクに書き出すことができま"
@@ -6564,10 +6573,22 @@ msgstr ""
 
 msgid ""
 "If you know what is changed, you can narrow flush targets. Here is a "
-"correspondence table between command and flush targets."
+"correspondence table between command and flush targets for Groonga 9.0.2 or "
+"later."
+msgstr ""
+"もし変更点を把握しているなら、書き出し対象を狭めることができます。以下は"
+"Groonga 9.0.2以降向けのコマンドと書き出し対象の対応表です。"
+
+msgid ""
+"There is a different recommended way which depends on Groonga version. If "
+"Groonga is 9.0.1 or earlier ( ``--recursive dependent`` is not available ), "
+"you need to flush related objects explicitly, otherwise, using ``--recursive "
+"dependent`` is a recommended way not to forget flush target objects."
 msgstr ""
-"もし変更点を把握しているなら、書き出し対象を狭めることができます。以下はコマ"
-"ンドと書き出し対象の対応表です。"
+"Groonga が9.0.1以前の場合( ``--recursive dependent`` が使えないので)関連する"
+"オブジェクトを明示的に書き出す必要があります。それ以降はオブジェクトの書き出"
+"し忘れをしないようにするのには ``--recursive dependent`` を使うのがおすすめで"
+"す。"
 
 msgid "Flush targets"
 msgstr "書き出し対象"
@@ -6596,24 +6617,18 @@ msgstr ""
 "インデックスが張られているカラムがある場合、対応するインデックスカラムとその"
 "インデックスカラムのテーブルも書き出し対象になる。"
 
-msgid "Table and its columns::"
-msgstr "テーブルとそのテーブルのカラム::"
-
-msgid "A referenced table::"
-msgstr "参照されているテーブル::"
-
-msgid "A table of an index column::"
-msgstr "インデックスカラムのテーブル::"
-
-msgid "An index column::"
-msgstr "インデックスカラム::"
+msgid ""
+"Use ``--recursive dependent`` to flush target table and its columns, "
+"referenced tables and tables of corresponding index columns and "
+"corresponding index columns at once::"
+msgstr ""
+"対象となるテーブルとそのカラム、参照先のテーブル、インデックスが張られている"
+"カラムがある場合、対応するインデックスカラムとそのインデックスカラムのテーブ"
+"ルを書き出すのに ``--recursive dependent`` を使います。"
 
 msgid "Database is also flush target."
 msgstr "データベースも書き出し対象。"
 
-msgid "Database::"
-msgstr "データベース::"
-
 msgid "Target table and database."
 msgstr "処理対象のテーブルとデータベース。"
 
@@ -6628,6 +6643,9 @@ msgstr ""
 msgid "Database."
 msgstr "データベース。"
 
+msgid "Database::"
+msgstr "データベース::"
+
 msgid "Target column and database."
 msgstr "処理対象のカラムとデータベース。"
 
@@ -6637,6 +6655,27 @@ msgstr ":doc:`column_remove` と :doc:`column_rename`"
 msgid ":doc:`plugin_register` and :doc:`plugin_unregister`"
 msgstr ":doc:`plugin_register` と :doc:`plugin_unregister`"
 
+msgid ""
+"If Groonga is 9.0.1 or earlier ( ``--recursive dependent`` is not "
+"available ), flush objects explicitly. Here is a correspondence table "
+"between command and flush targets for Groonga 9.0.1 or earlier."
+msgstr ""
+"もしGroongaが9.0.1以前なら( ``--recursive dependent`` が使えないので) 明示的"
+"にオブジェクトを書き出す必要があります。以下はGroonga 9.0.1以前向けのコマンド"
+"と書き出し対象の対応表です。"
+
+msgid "Table and its columns::"
+msgstr "テーブルとそのテーブルのカラム::"
+
+msgid "A referenced table::"
+msgstr "参照されているテーブル::"
+
+msgid "A table of an index column::"
+msgstr "インデックスカラムのテーブル::"
+
+msgid "An index column::"
+msgstr "インデックスカラム::"
+
 msgid "``target_name``"
 msgstr ""
 
@@ -6686,15 +6725,21 @@ msgstr ""
 "ます。"
 
 msgid ""
-"``recursive`` value must be ``yes`` or ``no``. ``yes`` means that all of the "
-"specified flush target object and child objects are flush target objects. "
-"``no`` means that only the specified flush target object is flush target "
-"object."
+"``recursive`` value must be ``yes``, ``no`` or ``dependent``. ``yes`` means "
+"that all of the specified flush target object and child objects are flush "
+"target objects. ``no`` means that only the specified flush target object is "
+"flush target object. ``dependent`` means that all of the specified flush "
+"target object, child objects, corresponding table of index column and "
+"corresponding index column are flush target objects."
 msgstr ""
-"``recursive`` の値は ``yes`` または ``no`` でなければいけません。 ``yes`` は"
-"指定した書き出し対象オブジェクトとその子オブジェクトすべてを書き出し対象オブ"
-"ジェクトにするという意味です。 ``no`` は指定した書き出し対象オブジェクトのみ"
-"を書き出し対象オブジェクトにするという意味です。"
+"``recursive`` の値は ``yes`` または ``no`` もしくは ``dependent`` でなければ"
+"いけません。 ``yes`` は指定した書き出し対象オブジェクトとその子オブジェクトす"
+"べてを書き出し対象オブジェクトにするという意味です。 ``no`` は指定した書き出"
+"し対象オブジェクトのみを書き出し対象オブジェクトにするという意味です。"
+"``dependent`` は指定した書き出し対象オブジェクトとその子オブジェクトすべて、"
+"参照先のテーブル、インデックスが張られているカラムがある場合、対応するイン"
+"デックスカラムとそのインデックスカラムのテーブルを書き出し対象オブジェクトに"
+"するという意味です。 "
 
 msgid ""
 "The following ``io_flush`` flushes all changes in database, all tables and "
@@ -6726,6 +6771,143 @@ msgstr ""
 "``recursive`` パラメーターが指定されていないので、次のケースでは ``yes`` が使"
 "われます。"
 
+msgid ""
+"Since 9.0.2, ``--recursive dependent`` is added to flush not only target "
+"object and child objects, but also related objects. The related objects are:"
+msgstr ""
+"9.0.2から ``--recursive dependent`` が追加され、書き出し対象とその子オブジェ"
+"クトだけでなく、関連したオブジェクトも書き出し対象にするようになりました。関"
+"連するオブジェクトは次のとおり::"
+
+msgid "A referenced table"
+msgstr "参照されているテーブル"
+
+msgid ""
+"A related index column (There is source column in target ``TABLE_NAME``)"
+msgstr "関連するインデックスカラム(対象の ``TABLE_NAME`` にソースカラムがある)"
+
+msgid ""
+"A table of related index column (There is source column in target "
+"``TABLE_NAME``)"
+msgstr ""
+"関連するインデックスカラムのテーブル(対象の ``TABLE_NAME`` にソースカラムがあ"
+"る)"
+
+msgid "It is useful not to forget flushing related objects."
+msgstr "関連するオブジェクトのフラッシュ漏れをなくすのに便利です。"
+
+msgid ""
+"For example, ``--recursive dependent`` is specified for ``TABLE_NAME``, this "
+"option executes equivalent to the following commands internally."
+msgstr ""
+"例えば、 ``--recursive dependent`` が ``TABLE_NAME`` に指定されていると、この"
+"オプションは以下と同等のコマンドを内部で実行します。"
+
+msgid "Flush table and its columns::"
+msgstr "テーブルとそのテーブルのカラムをフラッシュ::"
+
+msgid "Flush a referenced table::"
+msgstr "参照されているテーブルをフラッシュ::"
+
+msgid ""
+"Flush a related index column (There is source column in ``TABLE_NAME``)::"
+msgstr ""
+"関連するインデックスカラムをフラッシュ(対象の ``TABLE_NAME`` にソースカラムが"
+"ある)::"
+
+msgid ""
+"Flush a table of related index column (There is source column in "
+"``TABLE_NAME``)::"
+msgstr ""
+"関連するインデックスカラムのテーブルをフラッシュ(対象の ``TABLE_NAME`` にソー"
+"スカラムがある)::"
+
+msgid ""
+"To confirm whether all target objects are flushed correctly, you can check "
+"query log::"
+msgstr ""
+"すべての対象となるオブジェクトが正しくフラッシュされたかを確認するにはクエ"
+"リーログをチェックします::"
+
+msgid ""
+"In above example, specified not only ``Users`` table, related lexicon table "
+"``Terms`` and index column ``Terms.users_name`` (data source is ``Users."
+"name``) are also flushed."
+msgstr ""
+"上記の例では、 指定した ``Users`` テーブルだけでなく、関連する語彙表の "
+"``Terms`` テーブルとインデックスカラム ``Terms.users_name`` カラム( ``Users."
+"name`` がソースカラム)もフラッシュされています。"
+
+msgid ""
+"``flush[(anonymous:...)]`` and ``flush[(DB)]`` means that Groonga's internal "
+"objects are also flushed."
+msgstr ""
+"``flush[(anonymous:...)]`` と ``flush[(DB)]`` はGroongaの内部のオブジェクトが"
+"フラッシュされたことを意味します。"
+
+msgid "Log"
+msgstr "ログ"
+
+msgid "``flush[(anonymous:table:dat_key)]``"
+msgstr ""
+
+msgid ""
+"The internal object names in DB are flushed. If ``GRN_DB_KEY=pat`` is set, "
+"``TABLE_PAT_KEY`` is used instead."
+msgstr ""
+"DB内部のオブジェクト名がフラッシュされます。もし ``GRN_DB_KEY=pat`` が指定さ"
+"れていると ``TABLE_PAT_KEY`` が使われます。"
+
+msgid ""
+"``flush[(anonymous:column:var_size)]`` (logged as first ``(anonymous:column:"
+"var_size)`` object)"
+msgstr ""
+"``flush[(anonymous:column:var_size)]`` (1番目に記録されている ``(anonymous:"
+"column:var_size)`` オブジェクト)"
+
+msgid ""
+"The internal object metadata (builtin types, token filter and so on) are "
+"flushed."
+msgstr ""
+"内部のオブジェクトのメタデータ(組込の型だったり、トークンフィルターなど)がフ"
+"ラッシュされます。"
+
+msgid ""
+"This is a variable sized column which stores the above internal object "
+"metadata."
+msgstr ""
+"可変長のカラムで、内部で使っているオブジェクトのメタデータを保持しています。"
+
+msgid "``flush[(anonymous:table:hash_key)]``"
+msgstr ""
+
+msgid ""
+"The internal configuration objects (which is set by ``config_set``) are "
+"flushed."
+msgstr ""
+"設定情報のオブジェクト( ``config_set`` で設定される)がフラッシュされます。"
+
+msgid ""
+"``flush[(anonymous:column:var_size)]`` (logged as second ``(anonymous:column:"
+"var_size)`` object)"
+msgstr ""
+"``flush[(anonymous:column:var_size)]`` (2番目に記録されている ``(anonymous:"
+"column:var_size)`` オブジェクト)"
+
+msgid ""
+"The internal object metadata (options about internal objects such as "
+"specified tokenizer options) are flushed."
+msgstr ""
+"内部のオブジェクトのメタデータ(内部で使っているオブジェクトのオプション。トー"
+"クナイザーのオプションなど)がフラッシュされます。"
+
+msgid "``flush[(DB)]``"
+msgstr ""
+
+msgid "The DB changes (lock acquired during ``io_flush``) are flushed."
+msgstr ""
+"DBの変更( ``io_flush`` を実行中にロックを獲得している) がフラッシュされます。"
+
 msgid "``only_opened``"
 msgstr ""
 
@@ -23917,9 +24099,6 @@ msgstr ""
 msgid "We can also get newly registered records by searching:"
 msgstr "検索すると新しく登録されたレコードもヒットします:"
 
-msgid "Log"
-msgstr "ログ"
-
 msgid ""
 "Groonga has two log files. They are process log and query log. Process log "
 "is for all of :doc:`executables/groonga` works. Query log is just for query "
@@ -26266,22 +26445,22 @@ msgstr ""
 msgid "Rules"
 msgstr "ルール"
 
-msgid ":doc:commands/logical_count"
+msgid ":doc:`commands/logical_count`"
 msgstr ""
 
-msgid ":doc:commands/logical_parameters"
+msgid ":doc:`commands/logical_parameters`"
 msgstr ""
 
-msgid ":doc:commands/logical_range_filter"
+msgid ":doc:`commands/logical_range_filter`"
 msgstr ""
 
-msgid ":doc:commands/logical_select"
+msgid ":doc:`commands/logical_select`"
 msgstr ""
 
-msgid ":doc:commands/logical_shard_list"
+msgid ":doc:`commands/logical_shard_list`"
 msgstr ""
 
-msgid ":doc:commands/logical_table_remove"
+msgid ":doc:`commands/logical_table_remove`"
 msgstr ""
 
 msgid "Suggest"
@@ -29056,15 +29235,5 @@ msgstr ""
 msgid "``window_sum``"
 msgstr ""
 
-#~ msgid ""
-#~ "You can confirm that ``--match_columns _key`` and ``--query Alice`` are "
-#~ "evaluated by the ``Terms.people_key_roles_index`` newly created multiple "
-#~ "columns full text search index column from log. Groonga reports used "
-#~ "index columns in ``info`` log level. You can change log level dynamically "
-#~ "by :doc:`log_level` command."
-#~ msgstr ""
-#~ "ログを確認すると、新しく作成した ``Terms.people_key_roles_index`` マルチカ"
-#~ "ラム全文検索インデックスカラムを使って ``--match_columns _key`` と ``--"
-#~ "query Alice`` を評価していることがわかります。Groongaは使用したインデック"
-#~ "スカラムを ``info`` ログレベルでログに出力します。ログレベルは :doc:"
-#~ "`log_level` コマンドを使うと動的に変更できます。"
+#~ msgid "Then flush database::"
+#~ msgstr "データベースを書き出す::"

  Modified: doc/source/reference/commands/io_flush.rst (+161 -3)
===================================================================
--- doc/source/reference/commands/io_flush.rst    2019-04-17 16:43:22 +0900 (d7f9ebf9e)
+++ doc/source/reference/commands/io_flush.rst    2019-04-17 18:08:48 +0900 (783187b84)
@@ -77,6 +77,11 @@ All parameters are optional::
 
    :ref:`io-flush-only-opened` is added.
 
+.. versionadded:: 9.0.2
+
+   ``--recursive dependent`` option is added. It is recommended way to flush
+   target object and its related objects since 9.0.2. See :ref:`io-flush-recursive` about details.
+
 Usage
 -----
 
@@ -87,7 +92,83 @@ You can flush all changes in memory to disk with no arguments:
 .. io_flush
 
 If you know what is changed, you can narrow flush targets. Here is a
-correspondence table between command and flush targets.
+correspondence table between command and flush targets for Groonga 9.0.2 or later.
+
+.. note:: There is a different recommended way which depends on Groonga version.
+   If Groonga is 9.0.1 or earlier ( ``--recursive dependent`` is not available ), you
+   need to flush related objects explicitly, otherwise, using ``--recursive dependent``
+   is a recommended way not to forget flush target objects.
+
+.. list-table::
+   :header-rows: 1
+
+   * - Command
+     - Flush targets
+     - ``io_flush`` arguments
+   * - :doc:`load` and :doc:`delete`
+     - Target table and its columns.
+
+       If there are one or more reference columns in these columns,
+       referenced tables are also flush targets.
+
+       If there are one or more indexed columns in these columns,
+       tables of corresponding index columns and corresponding index
+       columns are also flush targets.
+
+     - Use ``--recursive dependent`` to flush target table and
+       its columns, referenced tables and tables of corresponding index columns
+       and corresponding index columns at once::
+
+         io_flush --target_name TABLE_NAME --recursive dependent
+
+   * - :doc:`truncate`
+     - Target table and its columns.
+
+       If there are one or more reference columns in these columns,
+       referenced tables are also flush targets.
+
+       If there are one or more indexed columns in these columns,
+       tables of corresponding index columns and corresponding index
+       columns are also flush targets.
+
+       Database is also flush target.
+
+     - Use ``--recursive dependent`` to flush target table and its columns,
+       referenced tables and tables of corresponding index columns and corresponding index
+       columns at once::
+
+         io_flush --target_name TABLE_NAME --recursive dependent
+
+   * - :doc:`table_create`
+     - Target table and database.
+     - Table::
+
+         io_flush --target_name TABLE_NAME --recursive dependent
+
+   * - :doc:`table_remove`, :doc:`table_rename` and :doc:`logical_table_remove`
+     - Database.
+     - Database::
+
+         io_flush --recursive no
+   * - :doc:`column_create`
+     - Target column and database.
+     - Table::
+
+         io_flush --target_name TABLE_NAME.COLUMN_NAME --recursive dependent
+   * - :doc:`column_remove` and :doc:`column_rename`
+     - Database.
+     - Database::
+
+         io_flush --recursive no
+   * - :doc:`plugin_register` and :doc:`plugin_unregister`
+     - Database.
+     - Database::
+
+         io_flush --recursive no
+
+If Groonga is 9.0.1 or earlier ( ``--recursive dependent`` is not available ), flush
+objects explicitly. Here is a correspondence table between command and flush targets
+for Groonga 9.0.1 or earlier.
 
 .. list-table::
    :header-rows: 1
@@ -244,10 +325,12 @@ Child objects of column is nothing.
 If you specify ``yes`` to :ref:`io-flush-only-opened`, ``recursive``
 is ignored.
 
-``recursive`` value must be ``yes`` or ``no``. ``yes`` means that all
+``recursive`` value must be ``yes``, ``no`` or ``dependent``. ``yes`` means that all
 of the specified flush target object and child objects are flush
 target objects. ``no`` means that only the specified flush target
-object is flush target object.
+object is flush target object. ``dependent`` means that all of the specified flush target object,
+child objects, corresponding table of index column and corresponding index column are flush
+target objects.
 
 The following ``io_flush`` flushes all changes in database, all tables
 and all columns:
@@ -279,6 +362,81 @@ isn't specified:
 .. include:: ../../example/reference/commands/io_flush/recursive_default.log
 .. io_flush
 
+Since 9.0.2, ``--recursive dependent`` is added to flush not only target object
+and child objects, but also related objects. The related objects are:
+
+* A referenced table
+* A related index column (There is source column in target ``TABLE_NAME``)
+* A table of related index column (There is source column in target ``TABLE_NAME``)
+
+It is useful not to forget flushing related objects.
+
+For example, ``--recursive dependent`` is specified for ``TABLE_NAME``, this
+option executes equivalent to the following commands internally.
+
+- Flush table and its columns::
+
+    io_flush --target_name TABLE_NAME --recursive yes
+
+- Flush a referenced table::
+
+    io_flush --target_name REFERENCED_TABLE_NAME --recursive no
+
+- Flush a related index column (There is source column in ``TABLE_NAME``)::
+
+    io_flush --target_name TABLE_NAME_OF_INDEX_COLUMN.INDEX_COLUMN
+
+- Flush a table of related index column (There is source column in ``TABLE_NAME``)::
+
+    io_flush --target_name TABLE_NAME_OF_INDEX_COLUMN --recursive no
+
+To confirm whether all target objects are flushed correctly, you can check query log::
+
+    > io_flush --recursive "dependent" --target_name "Users"
+    :000000000000000 flush[Users]
+    :000000000000000 flush[Terms]
+    :000000000000000 flush[Terms.users_name]
+    :000000000000000 flush[Users.name]
+    :000000000000000 flush[(anonymous:table:dat_key)]
+    :000000000000000 flush[(anonymous:column:var_size)]
+    :000000000000000 flush[(anonymous:table:hash_key)]
+    :000000000000000 flush[(anonymous:column:var_size)]
+    :000000000000000 flush[(DB)]
+    <000000000000000 rc=0
+
+In above example, specified not only ``Users`` table, related lexicon table ``Terms`` and
+index column ``Terms.users_name`` (data source is ``Users.name``) are also flushed.
+
+``flush[(anonymous:...)]`` and ``flush[(DB)]`` means that Groonga's internal objects
+are also flushed.
+
+.. list-table::
+   :header-rows: 1
+
+   * - Log
+     - Description
+
+   * - ``flush[(anonymous:table:dat_key)]``
+     - The internal object names in DB are flushed. If ``GRN_DB_KEY=pat`` is set, ``TABLE_PAT_KEY`` is used instead.
+
+   * - ``flush[(anonymous:column:var_size)]`` (logged as first ``(anonymous:column:var_size)`` object)
+     - The internal object metadata (builtin types, token filter and so on) are flushed.
+
+       This is a variable sized column which stores the above internal object metadata.
+
+   * - ``flush[(anonymous:table:hash_key)]``
+
+     - The internal configuration objects (which is set by ``config_set``) are flushed.
+
+   * - ``flush[(anonymous:column:var_size)]`` (logged as second ``(anonymous:column:var_size)`` object)
+     - The internal object metadata (options about internal objects such as specified tokenizer options) are flushed.
+
+       This is a variable sized column which stores the above internal object metadata.
+
+   * - ``flush[(DB)]``
+
+     - The DB changes (lock acquired during ``io_flush``) are flushed.
+
 .. _io-flush-only-opened:
 
 ``only_opened``
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.osdn.me/mailman/archives/groonga-commit/attachments/20190417/c4e373bd/attachment-0001.html>


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