From 8b9bf952f41c24edbbaf58568f8fffb62d1c0360 Mon Sep 17 00:00:00 2001 From: Mattison Chao Date: Tue, 26 Dec 2023 09:09:23 +0800 Subject: [PATCH 1/4] *: avoid variable name conflict with imported package name This is a cleanup to avoid name conflict with imported package name. --- .idea/pebble.iml | 4 +++ .idea/vcs.xml | 6 +++++ .idea/workspace.xml | 62 +++++++++++++++++++++++++++++++++++++++++++++ db.go | 4 +-- 4 files changed, 74 insertions(+), 2 deletions(-) create mode 100644 .idea/pebble.iml create mode 100644 .idea/vcs.xml create mode 100644 .idea/workspace.xml diff --git a/.idea/pebble.iml b/.idea/pebble.iml new file mode 100644 index 0000000000..7ee078df7b --- /dev/null +++ b/.idea/pebble.iml @@ -0,0 +1,4 @@ + + + + \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml new file mode 100644 index 0000000000..35eb1ddfbb --- /dev/null +++ b/.idea/vcs.xml @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..08f96eb575 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + { + "associatedIndex": 3 +} + + + + { + "keyToString": { + "RunOnceActivity.OpenProjectViewOnStart": "true", + "RunOnceActivity.ShowReadmeOnStart": "true", + "RunOnceActivity.go.formatter.settings.were.checked": "true", + "RunOnceActivity.go.migrated.go.modules.settings": "true", + "RunOnceActivity.go.modules.automatic.dependencies.download": "true", + "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", + "WebServerToolWindowFactoryState": "false", + "git-widget-placeholder": "master", + "go.import.settings.migrated": "true", + "go.sdk.automatically.set": "true", + "last_opened_file_path": "/Users/mattisonchao/projects/cockroachdb/pebble", + "node.js.detected.package.eslint": "true", + "node.js.selected.package.eslint": "(autodetect)", + "nodejs_package_manager_path": "npm" + } +} + + + + + + + + + + + true + + \ No newline at end of file diff --git a/db.go b/db.go index 56b00ae5ee..b3e1e1e8e0 100644 --- a/db.go +++ b/db.go @@ -824,8 +824,8 @@ func (d *DB) applyInternal(batch *Batch, opts *WriteOptions, noSyncWait bool) er panic(fmt.Sprintf("pebble: batch db mismatch: %p != %p", batch.db, d)) } - sync := opts.GetSync() - if sync && d.opts.DisableWAL { + syncWrite := opts.GetSync() + if syncWrite && d.opts.DisableWAL { return errors.New("pebble: WAL disabled") } From 415e48601695a0244c740cc4b5249b851574480e Mon Sep 17 00:00:00 2001 From: Mattison Chao Date: Tue, 26 Dec 2023 09:11:20 +0800 Subject: [PATCH 2/4] Remove useless files --- .idea/pebble.iml | 4 --- .idea/vcs.xml | 6 ----- .idea/workspace.xml | 62 --------------------------------------------- 3 files changed, 72 deletions(-) delete mode 100644 .idea/pebble.iml delete mode 100644 .idea/vcs.xml delete mode 100644 .idea/workspace.xml diff --git a/.idea/pebble.iml b/.idea/pebble.iml deleted file mode 100644 index 7ee078df7b..0000000000 --- a/.idea/pebble.iml +++ /dev/null @@ -1,4 +0,0 @@ - - - - \ No newline at end of file diff --git a/.idea/vcs.xml b/.idea/vcs.xml deleted file mode 100644 index 35eb1ddfbb..0000000000 --- a/.idea/vcs.xml +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - \ No newline at end of file diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index 08f96eb575..0000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - { - "associatedIndex": 3 -} - - - - { - "keyToString": { - "RunOnceActivity.OpenProjectViewOnStart": "true", - "RunOnceActivity.ShowReadmeOnStart": "true", - "RunOnceActivity.go.formatter.settings.were.checked": "true", - "RunOnceActivity.go.migrated.go.modules.settings": "true", - "RunOnceActivity.go.modules.automatic.dependencies.download": "true", - "RunOnceActivity.go.modules.go.list.on.any.changes.was.set": "true", - "WebServerToolWindowFactoryState": "false", - "git-widget-placeholder": "master", - "go.import.settings.migrated": "true", - "go.sdk.automatically.set": "true", - "last_opened_file_path": "/Users/mattisonchao/projects/cockroachdb/pebble", - "node.js.detected.package.eslint": "true", - "node.js.selected.package.eslint": "(autodetect)", - "nodejs_package_manager_path": "npm" - } -} - - - - - - - - - - - true - - \ No newline at end of file From 2261f9c19bbba801d3121caeea4bf93f01d91f92 Mon Sep 17 00:00:00 2001 From: Mattison Chao Date: Tue, 26 Dec 2023 09:20:05 +0800 Subject: [PATCH 3/4] Add missing part --- .idea/workspace.xml | 62 +++++++++++++++++++++++++++++++++++++++++++++ db.go | 2 +- 2 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml new file mode 100644 index 0000000000..fe4817f924 --- /dev/null +++ b/.idea/workspace.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + { + "associatedIndex": 3 +} + + + + + + + + + + + + + + + true + + \ No newline at end of file diff --git a/db.go b/db.go index b3e1e1e8e0..34f705dcc9 100644 --- a/db.go +++ b/db.go @@ -855,7 +855,7 @@ func (d *DB) applyInternal(batch *Batch, opts *WriteOptions, noSyncWait bool) er return err } } - if err := d.commit.Commit(batch, sync, noSyncWait); err != nil { + if err := d.commit.Commit(batch, syncWrite, noSyncWait); err != nil { // There isn't much we can do on an error here. The commit pipeline will be // horked at this point. d.opts.Logger.Fatalf("pebble: fatal commit error: %v", err) From 5228914f421527acd36b630157ec6cc2fcc1c188 Mon Sep 17 00:00:00 2001 From: Qiang Zhao Date: Wed, 27 Dec 2023 21:14:07 +0800 Subject: [PATCH 4/4] Delete .idea/workspace.xml --- .idea/workspace.xml | 62 --------------------------------------------- 1 file changed, 62 deletions(-) delete mode 100644 .idea/workspace.xml diff --git a/.idea/workspace.xml b/.idea/workspace.xml deleted file mode 100644 index fe4817f924..0000000000 --- a/.idea/workspace.xml +++ /dev/null @@ -1,62 +0,0 @@ - - - - - - - - - - - - - - - { - "associatedIndex": 3 -} - - - - - - - - - - - - - - - true - - \ No newline at end of file