diff --git a/doc/user/configuration-reference.xml b/doc/user/configuration-reference.xml index 5a39f48fa1255fdbcbf04c93867626947aa98a3e..519221212befe1323a2b02e7d8302bae83d3d5d0 100644 --- a/doc/user/configuration-reference.xml +++ b/doc/user/configuration-reference.xml @@ -39,7 +39,7 @@ or <para><option>--version</option>, <option>-V</option></para> <para>Print product name and version, for example: <programlisting><prompt>$ </prompt> <userinput>./tarantool --version</userinput> -Tarantool 1.6.0-1084-ge067689 +Tarantool 1.6.3-439-g7e1011b Target: Linux-x86_64-Debug ... </programlisting> @@ -95,7 +95,7 @@ The Lua program almost always begins by invoking <code>box.cfg()</code>, if the database server will be used or if ports need to be opened. For example, suppose <filename>script.lua</filename> contains the lines<programlisting>#!/usr/bin/env tarantool box.cfg{ - listen = os.getenv("LISTEN"), + listen = os.getenv("LISTEN_URI"), slab_alloc_arena = 0.1, pid_file = "tarantool.pid", rows_per_wal = 50 @@ -103,17 +103,19 @@ box.cfg{ print('Starting ',arg[1])</programlisting> and suppose the command line is <code>~/tarantool/src/tarantool script.lua ARG</code>. Then the screen might look like this:<programlisting> -<prompt>$</prompt> <userinput>export PRIMARY_PORT=3301</userinput> +<prompt>$</prompt> <userinput>export LISTEN_URI=3301</userinput> <prompt>$</prompt> <userinput>~/tarantool/src/tarantool script.lua ARG</userinput> -2014-07-02 10:19:29.078 ... version 1.6.0-1471-g663694c -2014-07-02 10:19:29.078 ... log level 5 -2014-07-02 10:19:29.078 ... mapping 107374184 bytes for a shared arena... -2014-07-02 10:19:29.086 ... initialized -2014-07-02 10:19:29.101 ... recovery start -2014-07-02 10:19:29.107 ... bound to primary port tcp://0.0.0.0:3301 -2014-07-02 10:19:29.108 ... ready to accept requests +... main/101/script.lua C> version 1.6.3-439-g7e1011b +... main/101/script.lua C> log level 5 +... main/101/script.lua I> mapping 107374184 bytes for a shared arena... +... main/101/spawner C> initialized +... main/101/script.lua I> recovery start +... main/101/script.lua I> recovering from `./00000000000000000000.snap' +... main/101/script.lua I> primary: bound to 0.0.0.0:3301 +... main/102/leave_local_hot_standby I> ready to accept requests +... main/103/snapshot_daemon I> started Starting ARG -2014-07-02 10:19:29.108 ... entering the event loop</programlisting> +... main C> entering the event loop</programlisting> </para> </section> @@ -121,7 +123,7 @@ Starting ARG <title>Configuration parameters</title> <para> Configuration parameters have the form - <code>box.cfg{<replaceable> key = value [, key_value ...]</replaceable>}</code>. + <code>box.cfg{<replaceable> key = value [, key = value ...]</replaceable>}</code>. Since box.cfg may contain many configuration parameters and since some of the parameters (such as directory addresses) are semi-permanent, it's best to keep box.cfg in a Lua file. diff --git a/doc/user/databases.xml b/doc/user/databases.xml index cc92af0d232b553a19d9eb3f08959a40246e098d..01bd3426338b9b6c386e21747d43644aa3ac1b08 100644 --- a/doc/user/databases.xml +++ b/doc/user/databases.xml @@ -2258,24 +2258,24 @@ tarantool> <userinput>box.cfg</userinput> <bridgehead renderas="sect4">Example</bridgehead><programlisting> tarantool> <userinput>box.info()</userinput> --- -- version: 1.6.0-1663-g7bbb330 +- server: + lsn: 0 + ro: false + uuid: 137128fb-addd-41ee-9f9a-7d6deaef61e7 + id: 1 + version: 1.6.3-439-g7e1011b status: running vclock: - 0 - pid: 10316 - logger_pid: 0 + pid: 21740 recovery_last_update: 0 recovery_lag: 0 - build: - [ build flags and options are omitted from this example ] + logger_pid: 0 uptime: 2880 snapshot_pid: 0 - node: - lsn: 0 - uuid: e8530a1a-d450-4598-bcc9-6efc842dfe20 - id: 1 -... -</programlisting> + build: + [ build flags and options are omitted from this example ] +...</programlisting> </listitem> </varlistentry> <varlistentry> @@ -2294,7 +2294,7 @@ tarantool> <userinput>box.info.logger_pid</userinput> ... tarantool> <userinput>box.info.version</userinput> --- -- 1.6.0-819-geefb2d0 +- 1.6.3-439-g7e1011b ... tarantool> <userinput>box.info.uptime</userinput> --- @@ -2765,7 +2765,7 @@ tarantool> <userinput>box.stat().DELETE -- a selected item of the table</userinp example: <programlisting>tarantool> <userinput>box.info.version</userinput> --- -- 1.6.0-805-g4a7e71d +- 1.6.3-439-g7e1011b ... tarantool> <userinput>box.snapshot()</userinput> --- diff --git a/doc/user/plugins.xml b/doc/user/plugins.xml index b5545a8965a056fd3015c53c1d10d455cc6b7096..f3a3c572c771e4a345a35ca66d3ac8c953cdc8dd 100644 --- a/doc/user/plugins.xml +++ b/doc/user/plugins.xml @@ -137,7 +137,8 @@ Linking CXX shared library libmysql.so # Start the Tarantool server. Do not use a Lua initialization file. <prompt>$ </prompt><userinput>~/tarantool/src/tarantool</userinput> -~/tarantool/src/tarantool: version 1.6.0-1085-gf6d30a5 +~/tarantool/src/tarantool: version 1.6.3-439-g7e1011b +type 'help' for interactive help <prompt>tarantool> </prompt> <userinput>box.cfg{}</userinput> ... # Enter the following lines on the prompt (again, change "/home/pgulutzan" @@ -260,7 +261,8 @@ Linking CXX shared library libpg.so # Start the Tarantool server. Do not use a Lua initialization file. <prompt>$ </prompt><userinput>~/tarantool/src/tarantool</userinput> -~/tarantool/src/tarantool: version 1.6.0-1085-gf6d30a5 +~/tarantool/src/tarantool: version 1.6.3-439-g7e1011b +type 'help' for interactive help <prompt>tarantool> </prompt> <userinput>box.cfg{}</userinput> # Enter the following lines on the prompt (again, change "/home/pgulutzan" diff --git a/doc/user/replication.xml b/doc/user/replication.xml index 668a80bd6a1b800db0fe88d7a206c24af18c13d5..025c103ba7783a2870ce5a95906f87dc3dce5338 100644 --- a/doc/user/replication.xml +++ b/doc/user/replication.xml @@ -32,17 +32,17 @@ identifier which is unique within the cluster, known as the A replica gets all updates from the master by continuously fetching and applying its write-ahead log (WAL). Each record in the WAL represents a single Tarantool - command such as INSERT or UPDATE or DELETE, and is assigned + data-change request such as INSERT or UPDATE or DELETE, and is assigned a monotonically growing log sequence number (LSN). In essence, Tarantool replication is row-based: - all data change commands are fully deterministic and operate - on a single record. + each data change command is fully deterministic and operate + on a single tuple. </para> <para> A stored program invocation <!-- , unless requested explicitly, --> is not written to the write-ahead log. Instead, log events - for actual UPDATEs and DELETEs, performed by the Lua code, + for actual data-change requests, performed by the Lua code, are written to the log. This ensures that possible non-determinism of Lua does not cause replication to go out of sync. @@ -85,7 +85,7 @@ identifier which is unique within the cluster, known as the If this first <code>box.cfg</code> request occurs with a "replication_source" clause, then the server is a replica and its snapshot file, along with the cluster information, - is copied from the master. Therefore, + is constructed from the write-ahead logs of the master. Therefore, to start replication, specify <olink targetptr="replication_source"/> in a <code>box.cfg</code> request. When a replica contacts a master for the first time, it becomes part of a cluster. @@ -99,6 +99,7 @@ identifier which is unique within the cluster, known as the A replica can be "re-seeded" by deleting all its files (the snapshot .snap file and the WAL .xlog files), then starting replication again -- the replica will then catch up with the master by retrieving all the master's tuples. + Again, this procedure works only if the master's WAL files are present. </para> <note><simpara> Replication parameters are "dynamic", which allows the @@ -280,7 +281,7 @@ $ <userinput>mkdir -p ~/tarantool_test_node_1</userinput> $ <userinput>cd ~/tarantool_test_node_1</userinput> ~/tarantool_test_node_1$ <userinput>rm -R ~/tarantool_test_node_1/*</userinput> ~/tarantool_test_node_1$ <userinput>~/tarantool-master/src/tarantool</userinput> -~/tarantool-master/src/tarantool: version 1.6.0-1724-g033ed69 +~/tarantool-master/src/tarantool: version 1.6.3-1724-g033ed69 type 'help' for interactive help tarantool> <userinput>box.cfg{listen=3301}</userinput> ... ... @@ -355,7 +356,7 @@ tarantool> 2014-08-14 13:41:31.097 [24958] main/101/spawner I> created a replica ~/tarantool_test_node_2$ <userinput>cd ~/tarantool_test_node_2</userinput> ~/tarantool_test_node_2$ <userinput>rm -R ~/tarantool_test_node_2/*</userinput> ~/tarantool_test_node_2$ <userinput>~/tarantool-master/src/tarantool</userinput> -/home/pgulutzan/tarantool-master/src/tarantool: version 1.6.0-1724-g033ed69 +/home/pgulutzan/tarantool-master/src/tarantool: version 1.6.3-1724-g033ed69 type 'help' for interactive help tarantool> <userinput>box.cfg{listen=3302, replication_source=3301}</userinput> ... ... @@ -407,7 +408,7 @@ tarantool> <userinput>s:insert{1,'Tuple inserted on Terminal #1'}</userinput> ~/tarantool_test_node_2$ cd ~/tarantool_test_node_2 ~/tarantool_test_node_2$ rm -R ~/tarantool_test_node_2/* ~/tarantool_test_node_2$ ~/tarantool-master/src/tarantool -/home/pgulutzan/tarantool-master/src/tarantool: version 1.6.0-1724-g033ed69 +/home/pgulutzan/tarantool-master/src/tarantool: version 1.6.3-1724-g033ed69 type 'help' for interactive help tarantool> box.cfg{listen=3302, replication_source=3301} ... ... @@ -633,7 +634,7 @@ total 12 -rw-rw-r-- 1 486 Aug 14 14:52 00000000000000000000.xlog drwxr-x--- 2 4096 Aug 14 13:41 sophia ~/tarantool_test_node_1$ <userinput>~/tarantool-master/src/tarantool</userinput> -~/tarantool: version 1.6.0-1724-g033ed69 +~/tarantool: version 1.6.3-1724-g033ed69 type 'help' for interactive help tarantool> <userinput>box.cfg{listen=3301}</userinput> ... ... @@ -694,7 +695,7 @@ The screen now looks like this: <tbody> <row><entry><programlisting>... ... ~/tarantool_test_node_1$ ~/tarantool-master/src/tarantool -~/tarantool: version 1.6.0-1724-g033ed69 +~/tarantool: version 1.6.3-1724-g033ed69 type 'help' for interactive help tarantool> box.cfg{listen=3301} ... ... diff --git a/doc/user/stored-procedures.xml b/doc/user/stored-procedures.xml index 75f38d7bd02a37ff7a412f358714c67a1a3dae1b..1aa26a9ebdf60c2186c151d5a3627e123b320453 100644 --- a/doc/user/stored-procedures.xml +++ b/doc/user/stored-procedures.xml @@ -978,9 +978,12 @@ procedures. <para> Cancel a <code>fiber</code>. Running and suspended fibers can be canceled. + After a fiber has been canceled, attempts to operate on it will cause errors, + for example <code>fiber.id(<replaceable>fiber</replaceable>)</code> will cause + "error: the fiber is dead". </para> <para> - Parameters: <code>fiber</code> = the fiber to be canceled. + Parameters: fiber object, for example the fiber returned by <code>fiber.create</code>. </para> <para> Possible errors: the specified fiber does not permit cancel. @@ -2005,6 +2008,27 @@ end --- - my ... +</programlisting> + </listitem> + </varlistentry> + + <varlistentry> + <term><emphasis role="lua">fio.dirname(<replaceable>path-name</replaceable>)</emphasis></term> + <listitem> + <para> + Given a full path name, remove the final part (the file name). + </para> + <para> + Parameters: (type = string) path name. + </para> + <para> + Returns: directory name, that is, path name except for file name. + </para> + <bridgehead renderas="sect4">Example</bridgehead><programlisting> +<prompt>tarantool></prompt> <userinput>fio.dirname('/path/to/my.lua')</userinput> +--- +- /path/to/ +... </programlisting> </listitem> </varlistentry> diff --git a/doc/user/tutorial.xml b/doc/user/tutorial.xml index c11b52f6ba3b147f2cf2c5c5f4d479015d1bc87f..77e82044a9264d420fd0aaf4cdb11749303292b9 100644 --- a/doc/user/tutorial.xml +++ b/doc/user/tutorial.xml @@ -521,18 +521,17 @@ The server name is <computeroutput><filename>tarantool</filename></computeroutpu <para> If all goes well, you will see the server displaying progress as it initializes, something like this:<programlisting><computeroutput> tarantool> box.cfg{listen=3301} -2014-08-07 09:41:41.077 ... version 1.6.0-1691-g95435d4 +2014-08-07 09:41:41.077 ... version 1.6.3-439-g7e1011b 2014-08-07 09:41:41.077 ... log level 5 2014-08-07 09:41:41.078 ... mapping 1073741824 bytes for a shared arena... -2014-08-07 09:41:41.079 ... start sophia recover 2014-08-07 09:41:41.079 ... initialized -2014-08-07 09:41:41.079 ... complete 2014-08-07 09:41:41.081 ... initializing an empty data directory 2014-08-07 09:41:41.095 ... creating `./00000000000000000000.snap.inprogress' 2014-08-07 09:41:41.095 ... saving snapshot `./00000000000000000000.snap.inprogress' 2014-08-07 09:41:41.127 ... done -2014-08-07 09:41:41.128 ... bound to primary port 0.0.0.0:3301 -2014-08-07 09:41:41.128 ... ready to accept requests</computeroutput></programlisting> +2014-08-07 09:41:41.128 ... primary: bound to 0.0.0.0:3301 +2014-08-07 09:41:41.128 ... ready to accept requests +2014-08-07 09:41:41.128 ... started</computeroutput></programlisting> </para> <para>