Commit Graph

25 Commits

Author SHA1 Message Date
Hector Sanjuan
61644365e0 pebble: Set default format_major_version to the newest
Additionally, add a warning when not using the newest version.
2024-03-03 19:25:21 -06:00
Hector Sanjuan
fa966102b6 Enable pebble in all architectures
Upstream was fixed to build on all platforms.
2023-12-07 11:06:27 +01:00
Hector Sanjuan
c6f97fd637 Bump go-ds-pebble version to 0.2.5 2023-12-06 12:50:22 +01:00
Hector Sanjuan
57489edbcf deps: Update mergo to dario.cat/mergo 2023-08-10 23:17:47 +02:00
Arthur Gavazza
4c520c94fa
Feat/add max concurrent compactions pebble config (#1900)
* feat: add max concurrent compactions pebble config

* test: refactor pebble config tests to add max concurrent compactions property

* Update datastore/pebble/config_test.go

---------

Co-authored-by: Hector Sanjuan <code@hector.link>
2023-04-12 14:27:08 +02:00
Hector Sanjuan
b6e8a6efd2 Pebble: make default
* Make pebble default (badger3 as fallback for unsupported platforms)
* Better configurations defaults for Pebble
2023-03-06 18:41:51 +01:00
Hector Sanjuan
7c32a117f1 service: do not show pebble as an option on unsupported architectures 2023-03-03 18:19:02 +01:00
Hector Sanjuan
615162b739 Fix #1844: Do not build pebble on non-supported platforms 2023-03-03 18:19:02 +01:00
Hector Sanjuan
f496e522cd Add Pebble support as datastore backend
Pebble is a modern datastore based on RocksDB. This commit adds support to use
it as datastore backend for IPFS-Cluster.
2022-12-02 11:29:33 +01:00
Hector Sanjuan
970bdc8cb0 Add Badger v3 support
This commit adds badger v3 support as datastore backend for IPFS Cluster.

Badgerv3 has a number of improvements over v1, particularly around
compaction. It is significantly more modern and should behave better in
general (some testing is pending).
2022-12-02 11:29:33 +01:00
Hector Sanjuan
755cebbe0d Enable spell checking and fix spelling errors (using US locale) 2022-06-16 17:43:30 +02:00
Hector Sanjuan
508791b547 Migrate from ipfs/ipfs-cluster to ipfs-cluster/ipfs-cluster
This performs the necessary renamings.
2022-06-16 17:43:30 +02:00
Hector Sanjuan
4ac2cf3eb0 Fix #1320: Add automatic GC to Badger datastore
This takes advantage of go-ds-badger "auto-gc" feature.

It will run a GC cycle made of multiple GC rounds (until it cannot GC more)
automatically. The behaviour is enabled by default in the configuration and
can be disabled by setting "gc_interval" to "0m". Hopefully this prevents
badger datastores from growing crazy.
2021-06-28 21:51:29 +02:00
Hector Sanjuan
0eef0ede89 Support a levelDB backend for cluster
Badger can take 1000x the amount of needed space if not GC'ed or compacted
(#1320), even for non heavy usage. Cluster has no provisions to run datastore
GC operations and while they could be added, they are not ensured to
help. Improvements on Badger v3 might help but would still need to GC
explicitally.

Cluster was however designed to support any go-datastore as backend.

This commit adds LevelDB support. LevelDB go-datastore wrapper is mature, does
not need GC and should work well for most cluster usecases, which are not
overly demanding.

A new `--datastore` flag has been added on init. The store backend is selected
based on the value in the configuration, similar to how raft/crdt is. The
default is set to leveldb. From now on it should be easier to add additional
backends, i.e. badgerv3.
2021-06-09 19:40:36 +02:00
Kishan Mohanbhai Sagathiya
ae8e74453b Fix #937: Print full working configuration at startup
Only when using debug mode

Co-authored-by: Hector Sanjuan <code@hector.link>
2020-05-15 01:33:04 +02:00
Hector Sanjuan
c072682306 badger: reduce memory footprint with better default options
They are the same that go-ipfs has started using, our users can
always overwrite them though (unlike go-ipfs).
2020-04-01 13:18:41 +02:00
Kishan Sagathiya
295915272b Tests: multiple fixes to tests reliability (#943)
This makes a number of fixes to improve the reliability of tests.
2019-10-31 21:51:13 +01:00
Hector Sanjuan
b247783dd8 Badger: Do not compact L0 on close by default
If this goes wrong probably database goes to hell. We want to stop
the daemon as quickly as possible.
2019-08-28 12:09:31 +02:00
Hector Sanjuan
d8cb4cd7d8 Update dependencies 2019-07-05 18:12:57 +01:00
Hector Sanjuan
353d403b3a Fix badger breaking EVERYTHING 2019-06-23 09:57:45 +01:00
Adrian Lanzafame
fd82463601
remove omitempty
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-05-21 22:46:28 +10:00
Adrian Lanzafame
a956ec252b
fix panic
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-05-21 22:45:49 +10:00
Adrian Lanzafame
655aef4011
expose entire badger config
License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-05-21 22:43:18 +10:00
Adrian Lanzafame
3d4412ffd4
expose badger loading mode conf
For simplicity, I haven't exposed the entire
badger config. Also, due to go default values and
the badger implementation, I have had to extract the
two loading mode config values so we can determine
whether it has actually has been set by the user in
the json config file.

License: MIT
Signed-off-by: Adrian Lanzafame <adrianlanzafame92@gmail.com>
2019-05-21 22:42:40 +10:00
Hector Sanjuan
acbd7fda60 Consensus: add new "crdt" consensus component
This adds a new "crdt" consensus component using go-ds-crdt.

This implies several refactors to fully make cluster consensus-component
independent:

* Delete mapstate and fully adopt dsstate (after people have migrated).
* Return errors from state methods rather than ignoring them.
* Add a new "datastore" modules so that we can configure datastores in the
   main configuration like other components.
* Let the consensus components fully define the "state.State". Thus, they do
not receive the state, they receive the storage where we put the state (a
go-datastore).
* Allow to customize how the monitor component obtains Peers() (the current
  peerset), including avoiding using the current peerset. At the moment the
  crdt consensus uses the monitoring component to define the current peerset.
  Therefore the monitor component cannot rely on the consensus component to
  produce a peerset.
* Re-factor/re-implementation of "ipfs-cluster-service state"
  operations. Includes the dissapearance of the "migrate" one.

The CRDT consensus component defines creates a crdt-datastore (with ipfs-lite)
and uses it to intitialize a dssate. Thus the crdt-store is elegantly
wrapped. Any modifications to the state get automatically replicated to other
peers. We store all the CRDT DAG blocks in the local datastore.

The consensus components only expose a ReadOnly state, as any modifications to
the shared state should happen through them.

DHT and PubSub facilities must now be created outside of Cluster and passed in
so they can be re-used by different components.
2019-04-17 19:14:26 +02:00