[PR #1856] [CLOSED] Optimize peer storing in SQLite #14359

Open
opened 2026-08-05 02:09:51 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1856
Author: @braginini
Created: 4/17/2024
Status: Closed

Base: mainHead: feature/optimize_sqlite_save


📝 Commits (10+)

  • 30ede29 Optimize peer storing in SQLite
  • e7a6483 Optimize all other objects storing in SQLite
  • a75f982 Copy account when storing to avoid reference issues
  • 99854a1 Add comments
  • 38e10af Add accountID reference
  • 83dfe8e Fix test compilation errors
  • 48aff7a Fix test compilation errors
  • fd3c1de Add save large account test
  • 93045f3 Fix rand lint issue
  • 3b3aa18 Store setup keys and ns groups in a batch

📊 Changes

17 files changed (+301 additions, -58 deletions)

View changed files

📝 management/server/account.go (+6 -5)
📝 management/server/http/accounts_handler_test.go (+1 -1)
📝 management/server/http/dns_settings_handler_test.go (+1 -1)
📝 management/server/http/events_handler_test.go (+1 -1)
📝 management/server/http/geolocation_handler_test.go (+1 -1)
📝 management/server/http/groups_handler_test.go (+3 -3)
📝 management/server/http/nameservers_handler_test.go (+1 -1)
📝 management/server/http/peers_handler_test.go (+1 -1)
📝 management/server/http/policies_handler_test.go (+1 -1)
📝 management/server/http/posture_checks_handler_test.go (+1 -1)
📝 management/server/http/routes_handler_test.go (+1 -1)
📝 management/server/http/setupkeys_handler_test.go (+1 -1)
📝 management/server/scheduler.go (+4 -4)
📝 management/server/sqlite_store.go (+99 -18)
📝 management/server/sqlite_store_test.go (+156 -1)
📝 management/server/user.go (+16 -10)
📝 management/server/user_test.go (+7 -7)

📄 Description

Describe your changes

Checklist

  • Is it a bug fix
  • Is a typo/documentation fix
  • Is a feature enhancement
  • It is a refactor
  • Created tests that fail without the change (if possible)
  • Extended the README / documentation, if necessary

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/netbirdio/netbird/pull/1856 **Author:** [@braginini](https://github.com/braginini) **Created:** 4/17/2024 **Status:** ❌ Closed **Base:** `main` ← **Head:** `feature/optimize_sqlite_save` --- ### 📝 Commits (10+) - [`30ede29`](https://github.com/netbirdio/netbird/commit/30ede299b859b96a34f32747f498d479a476af9c) Optimize peer storing in SQLite - [`e7a6483`](https://github.com/netbirdio/netbird/commit/e7a64839123f141ce792c235a34ce2aec922e645) Optimize all other objects storing in SQLite - [`a75f982`](https://github.com/netbirdio/netbird/commit/a75f982fcd80b351642733eee5c40bfb425bf1be) Copy account when storing to avoid reference issues - [`99854a1`](https://github.com/netbirdio/netbird/commit/99854a126a65c1f907de143b0a6487c68dbbaf6d) Add comments - [`38e10af`](https://github.com/netbirdio/netbird/commit/38e10af2d90b3c22e41a264ecf730d411df7a63c) Add accountID reference - [`83dfe8e`](https://github.com/netbirdio/netbird/commit/83dfe8e3a3ad84a09f41e825c0ff5eefcc9c3951) Fix test compilation errors - [`48aff7a`](https://github.com/netbirdio/netbird/commit/48aff7a26ef6a6de71716e1bd57e74137fdc0f82) Fix test compilation errors - [`fd3c1de`](https://github.com/netbirdio/netbird/commit/fd3c1dea8e4d7ee86183d37b870da73f07c2b01d) Add save large account test - [`93045f3`](https://github.com/netbirdio/netbird/commit/93045f3e3ad202e06add8add95284c22178ee12c) Fix rand lint issue - [`3b3aa18`](https://github.com/netbirdio/netbird/commit/3b3aa18148d72aa8eaa1c31e33ef0abd7629b60c) Store setup keys and ns groups in a batch ### 📊 Changes **17 files changed** (+301 additions, -58 deletions) <details> <summary>View changed files</summary> 📝 `management/server/account.go` (+6 -5) 📝 `management/server/http/accounts_handler_test.go` (+1 -1) 📝 `management/server/http/dns_settings_handler_test.go` (+1 -1) 📝 `management/server/http/events_handler_test.go` (+1 -1) 📝 `management/server/http/geolocation_handler_test.go` (+1 -1) 📝 `management/server/http/groups_handler_test.go` (+3 -3) 📝 `management/server/http/nameservers_handler_test.go` (+1 -1) 📝 `management/server/http/peers_handler_test.go` (+1 -1) 📝 `management/server/http/policies_handler_test.go` (+1 -1) 📝 `management/server/http/posture_checks_handler_test.go` (+1 -1) 📝 `management/server/http/routes_handler_test.go` (+1 -1) 📝 `management/server/http/setupkeys_handler_test.go` (+1 -1) 📝 `management/server/scheduler.go` (+4 -4) 📝 `management/server/sqlite_store.go` (+99 -18) 📝 `management/server/sqlite_store_test.go` (+156 -1) 📝 `management/server/user.go` (+16 -10) 📝 `management/server/user_test.go` (+7 -7) </details> ### 📄 Description ## Describe your changes ## Issue ticket number and link ### Checklist - [ ] Is it a bug fix - [ ] Is a typo/documentation fix - [x] Is a feature enhancement - [ ] It is a refactor - [ ] Created tests that fail without the change (if possible) - [ ] Extended the README / documentation, if necessary --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
saavagebueno added the pull-request label 2026-08-05 02:09:51 -04:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: DYNR/netbird#14359