From 5ab904eddec6dcc5ad701707fa79f1243c7ff660 Mon Sep 17 00:00:00 2001 From: shamb0t Date: Thu, 12 Dec 2019 13:19:15 +0000 Subject: [PATCH 1/2] pin option info --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index ee832a2..af7daea 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -69,6 +69,15 @@ const orbitdb = await OrbitDB.createInstance(ipfs, { offline: true, id: 'mylocal Note that an `id` will need to be passed if your IPFS node is offline. If you would like to start replicating databases after starting OrbitDB in offline mode, the OrbitDB instance needs to be re-created. See [#726](https://github.com/orbitdb/orbit-db/pull/726) +### Pinning and Garbage Collection + +OrbitDB does **not** automatically pin content added to IPFS. This means that if garbage collection is triggered, any unpinned content will be erased. An optional `pin` flag has been added which, when set to `true`, will pin the content to IPFS and can be set as follows: + +```js +await db.put('name', 'hello', { pin: true }) +``` +Note that this is currently _experimental_ and will degrade performance. It is recommended that you collect the hashes of the entries and pin them outside of the `db.put/add` calls before triggering garbage collection. + ## v0.22.1 - Thanks to [#712](https://github.com/orbitdb/orbit-db/pull/712) from @kolessios, as well as the efforts of @BartKnucle and @durac :heart:, OrbitDB now works on Windows :tada: We invite our Windows friends to try it out! From 99470f64cc7c3af5efe0aa51dd36a0644b87991f Mon Sep 17 00:00:00 2001 From: shamb0t Date: Thu, 12 Dec 2019 13:37:19 +0000 Subject: [PATCH 2/2] link to ipfs issue --- CHANGELOG.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index af7daea..3d48655 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -76,7 +76,9 @@ OrbitDB does **not** automatically pin content added to IPFS. This means that if ```js await db.put('name', 'hello', { pin: true }) ``` -Note that this is currently _experimental_ and will degrade performance. It is recommended that you collect the hashes of the entries and pin them outside of the `db.put/add` calls before triggering garbage collection. +Note that this is currently _experimental_ and will degrade performance. For more info see [this issue](https://github.com/ipfs/js-ipfs/issues/2650). + +It is recommended that you collect the hashes of the entries and pin them outside of the `db.put/add` calls before triggering garbage collection. ## v0.22.1