From 8b1950055d51d4360e596446e5ac0f41008e357d Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 7 Aug 2020 01:14:06 +0000 Subject: index+xcpdb: rename `--no-sync' to `--no-fsync' We'll continue supporting `--no-sync' even if its yet-to-make it it into a release, but the term `sync' is overloaded in our codebase which may be confusing to new hackers and users. None of our our code nor dependencies issue the sync(2) syscall, either, only fsync(2) and fdatasync(2). --- lib/PublicInbox/V2Writable.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/PublicInbox/V2Writable.pm') diff --git a/lib/PublicInbox/V2Writable.pm b/lib/PublicInbox/V2Writable.pm index 6b1effe5..a029fe4c 100644 --- a/lib/PublicInbox/V2Writable.pm +++ b/lib/PublicInbox/V2Writable.pm @@ -122,7 +122,7 @@ sub new { rotate_bytes => int((1024 * 1024 * 1024) / $PACKING_FACTOR), last_commit => [], # git epoch -> commit }; - $self->{over}->{-no_sync} = 1 if $v2ibx->{-no_sync}; + $self->{over}->{-no_fsync} = 1 if $v2ibx->{-no_fsync}; $self->{shards} = count_shards($self) || nproc_shards($creat); bless $self, $class; } @@ -292,7 +292,7 @@ sub _idx_init { # with_umask callback # for SQLite: my $mm = $self->{mm} = PublicInbox::Msgmap->new_file( "$self->{ibx}->{inboxdir}/msgmap.sqlite3", - $self->{ibx}->{-no_sync} ? 2 : 1); + $self->{ibx}->{-no_fsync} ? 2 : 1); $mm->{dbh}->begin_work; } -- cgit v1.2.3-24-ge0c7