Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
a1d666fd
Commit
a1d666fd
authored
12 years ago
by
pcherenkov
Browse files
Options
Downloads
Plain Diff
Merge branch 'bug923715'
parents
97f090b0
620d90b3
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
doc/user/configuration-reference.xml
+1
-1
1 addition, 1 deletion
doc/user/configuration-reference.xml
doc/user/persistence-architecture.xml
+38
-0
38 additions, 0 deletions
doc/user/persistence-architecture.xml
doc/user/stored-programs.xml
+38
-1
38 additions, 1 deletion
doc/user/stored-programs.xml
with
77 additions
and
2 deletions
doc/user/configuration-reference.xml
+
1
−
1
View file @
a1d666fd
...
@@ -259,7 +259,7 @@ lsn:4 tm:1301572313.691 t:65534 127.0.0.1:52728 UPDATE_FIELDS n:0flags:00000000
...
@@ -259,7 +259,7 @@ lsn:4 tm:1301572313.691 t:65534 127.0.0.1:52728 UPDATE_FIELDS n:0flags:00000000
</row>
</row>
<row>
<row>
<entry>
work_dir
</entry>
<entry
xml:id=
"work_dir"
xreflabel=
"work_dir"
>
work_dir
</entry>
<entry>
string
</entry>
<entry>
string
</entry>
<entry>
""
</entry>
<entry>
""
</entry>
<entry>
no
</entry>
<entry>
no
</entry>
...
...
This diff is collapsed.
Click to expand it.
doc/user/persistence-architecture.xml
+
38
−
0
View file @
a1d666fd
...
@@ -69,6 +69,44 @@ provided SELECTs are run in their own connections, is unaffected
...
@@ -69,6 +69,44 @@ provided SELECTs are run in their own connections, is unaffected
by disk load.
by disk load.
</para>
</para>
<para>
WAL writer ensures data consistency and synchronization
between requesting fibers, WAL writer and disk by
employing one the following modes of operation (designated by
<emphasis>
wal_mode
</emphasis>
and
<emphasis>
wal_fsync_delay
</emphasis>
configuration keys):
<orderedlist>
<listitem><para><emphasis>
write
</emphasis>
: fibers wait for their
data to be written to the log (no fsync(2));
</para></listitem>
<listitem><para><emphasis>
fsync
</emphasis>
: fibers wait for their
data, fsync(2) follows each write(2);
</para></listitem>
<listitem><para><emphasis>
fsync_delay
</emphasis>
: fibers wait for their
data, fsync every N=
<emphasis>
wal_fsync_delay
</emphasis>
seconds (N=0.0 means no fsync(2) - equivalent to
<emphasis>
wal_mode = "write"
</emphasis>
);
</para></listitem>
</orderedlist>
</para>
<!--
<para>
WAL writer ensures data consistency and synchronization
between requesting fibers, WAL writer and disk by
employing one the following modes of operation (designated by
<emphasis>wal_mode</emphasis> and
<emphasis>wal_fsync_delay</emphasis> configuration keys):
<orderedlist>
<listitem><emphasis>write</emphasis>: fibers wait for their
data to be written to the log (no fsync(2));</listitem>
<listitem><emphasis>fsync</emphasis>: fibers wait for their
data, fsync(2) follows each write(2);</listitem>
<listitem><emphasis>fsync_delay</emphasis>: fibers wait for their
data, fsync every N=<emphasis>wal_fsync_delay</emphasis>
seconds (N=0.0 means no fsync(2) - equivalent to
<emphasis>wal_mode = "write"</emphasis>);</listitem>
</orderedlist>
</para>
-->
</section>
</section>
<!--
<!--
vim: tw=66 syntax=docbk
vim: tw=66 syntax=docbk
...
...
This diff is collapsed.
Click to expand it.
doc/user/stored-programs.xml
+
38
−
1
View file @
a1d666fd
...
@@ -20,7 +20,7 @@
...
@@ -20,7 +20,7 @@
</para>
</para>
</blockquote>
</blockquote>
<para>
<para>
Procedures can be invoked
both
from the administrative
Procedures can be invoked from the administrative
console and using the binary protocol, for example:
console and using the binary protocol, for example:
<programlisting><computeroutput>
localhost> lua function f1() return 'hello' end
<programlisting><computeroutput>
localhost> lua function f1() return 'hello' end
---
---
...
@@ -57,6 +57,43 @@ localhost> lua "hello".." world"
...
@@ -57,6 +57,43 @@ localhost> lua "hello".." world"
...
...
</computeroutput></programlisting>
</computeroutput></programlisting>
</para>
</para>
<para>
Lua procedures could also be called at the time of initialization
using a dedicated
<emphasis>
init.lua
</emphasis>
script,
located in
<olink
targetptr=
"work_dir"
/>
.
An example of such a script is given below:
<programlisting>
<![CDATA[
-- Importing expirationd module
dofile("expirationd.lua")
function is_expired(args, tuple)
if tuple == nil then
return true
end
if #tuple <= args.field_no then
return true
end
field = tuple[args.field_no]
if field == nil or #field ~= 4 then
return true
end
local current_time = os.time()
local tuple_ts = box.unpack("i", field)
return current_time >
= tuple_ts + args.ttl
end
-- Run task
expirationd.run_task("exprd space 0", 0, is_expired, nil,
{ field_no = 1, ttl = 30 * 60 })
]]>
</programlisting>
</para>
<para>
<para>
There is a single global instance of Lua interpreter, which is
There is a single global instance of Lua interpreter, which is
shared across all connections. Anything prefixed with
shared across all connections. Anything prefixed with
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment