This repository has been archived by the owner on Dec 7, 2018. It is now read-only.
forked from facebookarchive/webscalesql-5.6
-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Setting WriteOptions through global system variables. The options are read-write. The WriteOptions object is copied for each use to avoid threading issues. Test Plan: Ran the test. Observed that sync option turns on and off WAL flushes per transaction (ie SQL statement). Stopped in the gdb and checked that WriteOptions had correct values. The diff is for this task: #15 Reviewers: mcallaghan, jonah Subscribers: webscalesql-eng@ Differential Revision: https://phabricator.fb.com/D1745210
- Loading branch information
Showing
3 changed files
with
137 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
SET GLOBAL rocksdb_write_disable_wal=false; | ||
SET GLOBAL rocksdb_write_timeout_hint_us=555; | ||
SET GLOBAL rocksdb_write_ignore_missing_column_families=true; | ||
create table aaa (id int primary key, i int) engine rocksdb; | ||
SET GLOBAL rocksdb_write_sync=off; | ||
insert aaa(id, i) values(1,1); | ||
show status like 'rocksdb_wal_synced'; | ||
Variable_name Value | ||
rocksdb_wal_synced 1 | ||
insert aaa(id, i) values(2,1); | ||
show status like 'rocksdb_wal_synced'; | ||
Variable_name Value | ||
rocksdb_wal_synced 1 | ||
insert aaa(id, i) values(3,1); | ||
show status like 'rocksdb_wal_synced'; | ||
Variable_name Value | ||
rocksdb_wal_synced 1 | ||
SET GLOBAL rocksdb_write_sync=on_commit; | ||
insert aaa(id, i) values(4,1); | ||
show status like 'rocksdb_wal_synced'; | ||
Variable_name Value | ||
rocksdb_wal_synced 2 | ||
insert aaa(id, i) values(5,1); | ||
show status like 'rocksdb_wal_synced'; | ||
Variable_name Value | ||
rocksdb_wal_synced 3 | ||
insert aaa(id, i) values(6,1); | ||
show status like 'rocksdb_wal_synced'; | ||
Variable_name Value | ||
rocksdb_wal_synced 4 | ||
drop table aaa; | ||
SET GLOBAL rocksdb_write_sync=off; | ||
SET GLOBAL rocksdb_write_disable_wal=false; | ||
SET GLOBAL rocksdb_write_timeout_hint_us=0; | ||
SET GLOBAL rocksdb_write_ignore_missing_column_families=false; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
SET GLOBAL rocksdb_write_disable_wal=false; | ||
SET GLOBAL rocksdb_write_timeout_hint_us=555; | ||
SET GLOBAL rocksdb_write_ignore_missing_column_families=true; | ||
|
||
create table aaa (id int primary key, i int) engine rocksdb; | ||
|
||
SET GLOBAL rocksdb_write_sync=off; | ||
insert aaa(id, i) values(1,1); | ||
show status like 'rocksdb_wal_synced'; | ||
insert aaa(id, i) values(2,1); | ||
show status like 'rocksdb_wal_synced'; | ||
insert aaa(id, i) values(3,1); | ||
show status like 'rocksdb_wal_synced'; | ||
|
||
SET GLOBAL rocksdb_write_sync=on_commit; | ||
insert aaa(id, i) values(4,1); | ||
show status like 'rocksdb_wal_synced'; | ||
insert aaa(id, i) values(5,1); | ||
show status like 'rocksdb_wal_synced'; | ||
insert aaa(id, i) values(6,1); | ||
show status like 'rocksdb_wal_synced'; | ||
|
||
# Cleanup | ||
drop table aaa; | ||
SET GLOBAL rocksdb_write_sync=off; | ||
SET GLOBAL rocksdb_write_disable_wal=false; | ||
SET GLOBAL rocksdb_write_timeout_hint_us=0; | ||
SET GLOBAL rocksdb_write_ignore_missing_column_families=false; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters