You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+11Lines changed: 11 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,6 +82,14 @@ The following options exist:
82
82
83
83
To create a compressed copy of the database in `/path/to/file.dump`, use the `dump()` method. If any data is written to the db during the dump, it is appended to the dump but most likely compressed.
84
84
85
+
### Changing where the lockfile is created
86
+
87
+
Normally, the lockfile to avoid concurrent access to the DB file is created right next to the DB file. You can change this, e.g. to put the lockfile into a `tmpfs`:
88
+
```ts
89
+
const db =newDB("/path/to/file", { lockfileDirectory: "/var/tmp" });
90
+
```
91
+
If the directory does not exist, it will be created when opening the DB.
92
+
85
93
### Copying and compressing the database
86
94
87
95
```ts
@@ -133,6 +141,9 @@ The file will be overwritten if it exists. The 2nd options argument can be used
133
141
Placeholder for next release:
134
142
### __WORK IN PROGRESS__
135
143
-->
144
+
### __WORK IN PROGRESS__
145
+
* Add the ability to specify where the lockfile is created
146
+
136
147
### 2.1.0 (2021-06-22)
137
148
* When opening the DB, recover from crashes that happened while compressing the DB
138
149
* Ensure that the DB files are flushed to disk when closing or renaming files
0 commit comments