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
15fcc7c0
Commit
15fcc7c0
authored
12 years ago
by
pcherenkov
Browse files
Options
Downloads
Plain Diff
Merge branch 'wal-doc' into doc-edit-1
parents
b0ac629f
ea32bf31
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
doc/user/persistence-architecture.xml
+23
-25
23 additions, 25 deletions
doc/user/persistence-architecture.xml
with
23 additions
and
25 deletions
doc/user/persistence-architecture.xml
+
23
−
25
View file @
15fcc7c0
...
...
@@ -7,7 +7,7 @@
<title>
Data persistence
</title>
<para>
To maintain data persistence, Tarantool writes each data change
request (INSERT, UPDATE, DELETE) into a write
ahead log. WAL
request (INSERT, UPDATE, DELETE) into a write
-
ahead log. WAL
files have extension
<filename>
.xlog
</filename>
and are stored in
<olink
targetptr=
"wal_dir"
/>
. A new WAL file is created for every
<olink
targetptr=
"rows_per_wal"
/>
records. Each INSERT, UPDATE or DELETE
...
...
@@ -23,36 +23,35 @@ each WAL record contains a checksum and a UNIX time stamp.
</para>
<para>
Tarantool procee
d
s requests atomically: a change is either
accepted and recorded in the WAL, or is
rejected wholesale
.
Tarantool proce
ss
es requests atomically: a change is either
accepted and recorded in the WAL, or
d
is
carded completely
.
Let's clarify how this happens, using REPLACE command as an
example:
<orderedlist>
<listitem><para>
The server
trie
s to locate
an old tuple identified
by
the same
primary key. If found, the tuple is re
membered for
later.
The server
attempt
s to locate
the original tuple
by
primary key. If found,
a reference to
the tuple is re
tained
for
later
use
.
</para></listitem>
<listitem><para>
The new tuple is
<emphasis>
validated
</emphasis>
. If it
violates a
ny of the
unique
key constraint
s
, misses
an
y of
indexed field
s
, or an index
ed
field type does not
match index
type
, the change is aborted.
The new tuple is
then
<emphasis>
validated
</emphasis>
. If it
violates a unique
-
key constraint, misses
an indexed field, or an index
-
field type does not
match
the type of the
index, the change is aborted.
</para></listitem>
<listitem><para>
The new tuple is marked 'invisible' and is added to
The new tuple is marked 'invisible' and is added to
the primary and secondary indexes.
</para></listitem>
<listitem><para>
A message is sent to a separate
<quote>
wal_writer
</quote>
thread requesting that the change is recorded in the WAL.
The fiber associate with the current connection is scheduled
off CPU until an acknowledgment is received from the WAL
writer.
A message is sent to
<quote>
wal_writer
</quote>
, running in a
separate thread, requesting that the change be recorded in the WAL.
The fiber associated with the current connection is suspended
until an acknowledgment from the WAL writer.
</para></listitem>
<listitem><para>
Upon success, 'invisible' flag is cleared
and the ol
d
tuple is deleted. A response is sent to the
Upon success,
the
'invisible' flag is cleared
and the o
rigina
l tuple is deleted. A response is sent to the
client. Upon failure, the new tuple is removed and
<olink
targetptr=
"ER_WAL_IO"
/>
error is sent to the client.
</para></listitem>
...
...
@@ -60,13 +59,12 @@ example:
</para>
<para>
Communication between master and WAL writer threads is asynchronous.
It is implemented using an asynchronous FIFO queue.
Asynchronous but reliable message passing between the master
and WAL writer threads allows Tarantool to continue handling
requests regardless of disk throughput. SELECT performance,
provided SELECTs are run in their own connections, is unaffected
by disk load.
The master and the WAL writer threads communicate using asynchronous (yet reliable)
messaging; the master theread, not being blocked on
WAL tasks, continues to handle requests quickly
even at hight volumes of disk I/O. For instance, SELECT performance,
provided SELECTs are run in their own connections, remains
unaffected by disk load.
</para>
<para>
...
...
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