Skip to content

feat(pebble): support pinning FormatMajorVersion #10789

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Apr 30, 2025
Merged

Conversation

gammazero
Copy link
Contributor

@gammazero gammazero commented Apr 24, 2025

  • Configure latest pebble database format at init
  • Do not automatically ratchet database format if set in config
  • Daemon message about new available pebble format
  • expose and document formatMajorVersion
  • add warning to users running badger, nudging them to switch to flatfs or pebble

Closes #10347

@gammazero gammazero requested a review from a team as a code owner April 24, 2025 14:46
@gammazero gammazero mentioned this pull request Apr 24, 2025
12 tasks
@lidel lidel mentioned this pull request Apr 24, 2025
40 tasks
@lidel lidel changed the title Upgrade to pebble v2.0.3 feat(pebble): support pinning FormatMajorVersion Apr 27, 2025
Copy link
Member

@lidel lidel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, feels like a sensible compromise, and low risk since pebble is still opt-in.

@gammazero there is a failing sharness I assume it needs landing #10788 first?

Example

ipfs init --profile=pebbleds creates config with explicit formatMajorVersion

  "Datastore": {                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   
    "Spec": {                                                                                                                                                                                                                                                                
      "child": {                                                                                                                                                                                                                                                             
        "formatMajorVersion": 19,                                                                                                                                                                                                                                            
        "path": "pebbleds",                                                                                                                                                                                                                                                  
        "type": "pebbleds"                                                                                                                                                                                                                                                   
      },                                                                                                                                                                                                                                                                     
      "prefix": "pebble.datastore",                                                                                                                                                                                                                                          
      "type": "measure"                                                                                                                                                                                                                                                      
    },                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  
  },

manually setting 18 (to simulate future pebble format update scenario) triggers below warning:

> ipfs daemon
Initializing daemon...
Kubo version: 0.35.0-dev-32612eb7a
Repo version: 16
System version: amd64/linux
Golang version: go1.24.2
⚠️ A newer pebble db format is available.
  To upgrade, set the following in the pebble datastore config:
    "formatMajorVersion": 19
PeerID: 12D3KooWSDFGEkyKaUhUjJVFK6JKhrp1NRhvwx2ffjQrm36fPokj
Swarm listening on 127.0.0.1:4001 (TCP+UDP)
Swarm listening on [::1]:4001 (TCP+UDP)
Run 'ipfs id' to inspect announced and discovered multiaddrs of this node.
RPC API server listening on /ip4/127.0.0.1/tcp/5001
WebUI: http://127.0.0.1:5001/webui
Gateway server listening on /ip4/127.0.0.1/tcp/8080
Daemon is ready

cc @hsanjuan for visibility on how Kubo deal with this

gammazero and others added 4 commits April 30, 2025 07:43
- Configure latest pebble database format at init
- Do not automatically ratchet database format if set in config
- Daemon messge about new available pebble format
@gammazero gammazero merged commit de16861 into master Apr 30, 2025
16 checks passed
@gammazero gammazero deleted the pebble-v2.0.3 branch April 30, 2025 19:15
pull bot pushed a commit to Manas1820/kubo that referenced this pull request Apr 30, 2025
* Upgrade to pebble v2.0.3

- Configure latest pebble database format at init
- Do not automatically ratchet database format if set in config
- Daemon messge about new available pebble format
- Document pebble config with formatMajorVersion
- Add warning to users running badger, nudging them to switch to flatfs or pebble
- docs: explain Pebble's `FormatMajorVersion`
- Use pebbleds instead of badgerds in t0060-daemon.sh
- Print badgerds warning message to stderr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Support pebble
2 participants