开源 企业版 高校版 私有云 模力方舟 AI 队友
代码拉取完成,页面将自动刷新
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
已有帐号? 立即登录
master
分支 (1397)
标签 (163)
master
unique-in-opt
vtab-limit-fix
compound-subquery-affinity
vector-in-fix
fts5-tokenize-blob
reuse-schema-3.45
bedrock
wal2
begin-concurrent
mistake
wal2-3.45
begin-concurrent-3.45
branch-3.45
branch-3.44
btree-ovfl-cache
pushdown-subquery
pushdown-IN-table
reuse-schema
branch-3.28
release
version-3.45.3
version-3.45.2
version-3.45.1
vesion-3.45.1
version-3.45.0
version-3.44.2
version-3.44.1
major-release
version-3.44.0
version-3.43.2
version-3.43.1
version-3.43.0
version-3.42.0
version-3.41.2
version-3.41.1
version-3.41.0
version-3.40.1
version-3.40.0
version-3.39.4
master
分支 (1397)
标签 (163)
master
unique-in-opt
vtab-limit-fix
compound-subquery-affinity
vector-in-fix
fts5-tokenize-blob
reuse-schema-3.45
bedrock
wal2
begin-concurrent
mistake
wal2-3.45
begin-concurrent-3.45
branch-3.45
branch-3.44
btree-ovfl-cache
pushdown-subquery
pushdown-IN-table
reuse-schema
branch-3.28
release
version-3.45.3
version-3.45.2
version-3.45.1
vesion-3.45.1
version-3.45.0
version-3.44.2
version-3.44.1
major-release
version-3.44.0
version-3.43.2
version-3.43.1
version-3.43.0
version-3.42.0
version-3.41.2
version-3.41.1
version-3.41.0
version-3.40.1
version-3.40.0
version-3.39.4
克隆/下载
克隆/下载
提示
下载代码请复制以下命令到终端执行
为确保你提交的代码身份被 Gitee 正确识别,请执行以下命令完成配置
初次使用 SSH 协议进行代码克隆、推送等操作时,需按下述提示完成 SSH 配置
1 生成 RSA 密钥
2 获取 RSA 公钥内容,并配置到 SSH公钥
在 Gitee 上使用 SVN,请访问 使用指南
使用 HTTPS 协议时,命令行会出现如下账号密码验证步骤。基于安全考虑,Gitee 建议 配置并使用私人令牌 替代登录密码进行克隆、推送等操作
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # 私人令牌
master
分支 (1397)
标签 (163)
master
unique-in-opt
vtab-limit-fix
compound-subquery-affinity
vector-in-fix
fts5-tokenize-blob
reuse-schema-3.45
bedrock
wal2
begin-concurrent
mistake
wal2-3.45
begin-concurrent-3.45
branch-3.45
branch-3.44
btree-ovfl-cache
pushdown-subquery
pushdown-IN-table
reuse-schema
branch-3.28
release
version-3.45.3
version-3.45.2
version-3.45.1
vesion-3.45.1
version-3.45.0
version-3.44.2
version-3.44.1
major-release
version-3.44.0
version-3.43.2
version-3.43.1
version-3.43.0
version-3.42.0
version-3.41.2
version-3.41.1
version-3.41.0
version-3.40.1
version-3.40.0
version-3.39.4
sqlite
/
ext
/
async
贡献代码
同步代码
对比差异 通过 Pull Request 同步
同步更新到分支
通过 Pull Request 同步
将会在向当前分支创建一个 Pull
Request,合入后将完成同步
File empty ...
提示: 由于 Git 不支持空文件夾,创建文件夹后会生成空的 .keep 文件
Loading...
README
NOTE (2012年11月29日):
The functionality implemented by this extension has been superseded
by WAL-mode. This module is no longer supported or maintained. The
code is retained for historical reference only.
------------------------------------------------------------------------------
Normally, when SQLite writes to a database file, it waits until the write
operation is finished before returning control to the calling application.
Since writing to the file-system is usually very slow compared with CPU
bound operations, this can be a performance bottleneck. This directory
contains an extension that causes SQLite to perform all write requests
using a separate thread running in the background. Although this does not
reduce the overall system resources (CPU, disk bandwidth etc.) at all, it
allows SQLite to return control to the caller quickly even when writing to
the database, eliminating the bottleneck.
 1. Functionality
 1.1 How it Works
 1.2 Limitations
 1.3 Locking and Concurrency
 2. Compilation and Usage
 3. Porting
1. FUNCTIONALITY
 With asynchronous I/O, write requests are handled by a separate thread
 running in the background. This means that the thread that initiates
 a database write does not have to wait for (sometimes slow) disk I/O
 to occur. The write seems to happen very quickly, though in reality
 it is happening at its usual slow pace in the background.
 Asynchronous I/O appears to give better responsiveness, but at a price.
 You lose the Durable property. With the default I/O backend of SQLite,
 once a write completes, you know that the information you wrote is
 safely on disk. With the asynchronous I/O, this is not the case. If
 your program crashes or if a power loss occurs after the database
 write but before the asynchronous write thread has completed, then the
 database change might never make it to disk and the next user of the
 database might not see your change.
 You lose Durability with asynchronous I/O, but you still retain the
 other parts of ACID: Atomic, Consistent, and Isolated. Many
 appliations get along fine without the Durablity.
 1.1 How it Works
 Asynchronous I/O works by creating a special SQLite "vfs" structure
 and registering it with sqlite3_vfs_register(). When files opened via 
 this vfs are written to (using the vfs xWrite() method), the data is not 
 written directly to disk, but is placed in the "write-queue" to be
 handled by the background thread.
 When files opened with the asynchronous vfs are read from 
 (using the vfs xRead() method), the data is read from the file on 
 disk and the write-queue, so that from the point of view of
 the vfs reader the xWrite() appears to have already completed.
 The special vfs is registered (and unregistered) by calls to the 
 API functions sqlite3async_initialize() and sqlite3async_shutdown().
 See section "Compilation and Usage" below for details.
 1.2 Limitations
 In order to gain experience with the main ideas surrounding asynchronous 
 IO, this implementation is deliberately kept simple. Additional 
 capabilities may be added in the future.
 For example, as currently implemented, if writes are happening at a 
 steady stream that exceeds the I/O capability of the background writer
 thread, the queue of pending write operations will grow without bound.
 If this goes on for long enough, the host system could run out of memory. 
 A more sophisticated module could to keep track of the quantity of 
 pending writes and stop accepting new write requests when the queue of 
 pending writes grows too large.
 1.3 Locking and Concurrency
 Multiple connections from within a single process that use this
 implementation of asynchronous IO may access a single database
 file concurrently. From the point of view of the user, if all
 connections are from within a single process, there is no difference
 between the concurrency offered by "normal" SQLite and SQLite
 using the asynchronous backend.
 If file-locking is enabled (it is enabled by default), then connections
 from multiple processes may also read and write the database file.
 However concurrency is reduced as follows:
 * When a connection using asynchronous IO begins a database
 transaction, the database is locked immediately. However the
 lock is not released until after all relevant operations
 in the write-queue have been flushed to disk. This means
 (for example) that the database may remain locked for some 
 time after a "COMMIT" or "ROLLBACK" is issued.
 * If an application using asynchronous IO executes transactions
 in quick succession, other database users may be effectively
 locked out of the database. This is because when a BEGIN
 is executed, a database lock is established immediately. But
 when the corresponding COMMIT or ROLLBACK occurs, the lock
 is not released until the relevant part of the write-queue 
 has been flushed through. As a result, if a COMMIT is followed
 by a BEGIN before the write-queue is flushed through, the database 
 is never unlocked,preventing other processes from accessing 
 the database.
 File-locking may be disabled at runtime using the sqlite3async_control()
 API (see below). This may improve performance when an NFS or other 
 network file-system, as the synchronous round-trips to the server be 
 required to establish file locks are avoided. However, if multiple 
 connections attempt to access the same database file when file-locking
 is disabled, application crashes and database corruption is a likely
 outcome.
2. COMPILATION AND USAGE
 The asynchronous IO extension consists of a single file of C code
 (sqlite3async.c), and a header file (sqlite3async.h) that defines the 
 C API used by applications to activate and control the modules 
 functionality.
 To use the asynchronous IO extension, compile sqlite3async.c as
 part of the application that uses SQLite. Then use the API defined
 in sqlite3async.h to initialize and configure the module.
 The asynchronous IO VFS API is described in detail in comments in 
 sqlite3async.h. Using the API usually consists of the following steps:
 1. Register the asynchronous IO VFS with SQLite by calling the
 sqlite3async_initialize() function.
 2. Create a background thread to perform write operations and call
 sqlite3async_run().
 3. Use the normal SQLite API to read and write to databases via 
 the asynchronous IO VFS.
 Refer to sqlite3async.h for details.
3. PORTING
 Currently the asynchronous IO extension is compatible with win32 systems
 and systems that support the pthreads interface, including Mac OSX, Linux, 
 and other varieties of Unix. 
 To port the asynchronous IO extension to another platform, the user must
 implement mutex and condition variable primitives for the new platform.
 Currently there is no externally available interface to allow this, but
 modifying the code within sqlite3async.c to include the new platforms
 concurrency primitives is relatively easy. Search within sqlite3async.c
 for the comment string "PORTING FUNCTIONS" for details. Then implement
 new versions of each of the following:
 static void async_mutex_enter(int eMutex);
 static void async_mutex_leave(int eMutex);
 static void async_cond_wait(int eCond, int eMutex);
 static void async_cond_signal(int eCond);
 static void async_sched_yield(void);
 The functionality required of each of the above functions is described
 in comments in sqlite3async.c.
举报
举报成功
我们将于2个工作日内通过站内信反馈结果给你!
请认真填写举报原因,尽可能描述详细。
请选择举报类型
取消
发送
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

简介

fork from https://github.com/sqlite/sqlite.git
暂无标签
README
未知许可证
查看未知开源许可协议
取消

发行版

暂无发行版

贡献者

全部

近期动态

不能加载更多了
编辑仓库简介
简介内容
主页
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/source-code-sync/sqlite.git
git@gitee.com:source-code-sync/sqlite.git
source-code-sync
sqlite
sqlite
master
点此查找更多帮助

搜索帮助

评论
仓库举报
回到顶部
登录提示
该操作需登录 Gitee 帐号,请先登录后再操作。
立即登录
没有帐号,去注册

AltStyle によって変換されたページ (->オリジナル) /