[PR #1016] [MERGED] Do not persist filestore when deleting indices #13227

Closed
opened 2026-08-05 02:07:49 -04:00 by saavagebueno · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/netbirdio/netbird/pull/1016
Author: @surik
Created: 7/17/2023
Status: Merged
Merged: 7/20/2023
Merged by: @pascal-fischer

Base: mainHead: filestore-index-deletion-optimisation


📝 Commits (1)

  • 7ddde41 Do not persist filestore when deleting indices

📊 Changes

1 file changed (+2 additions, -2 deletions)

View changed files

📝 management/server/file_store.go (+2 -2)

📄 Description

Describe your changes

Both TokenID2UserID and HashedPAT2TokenID are in-memory indices and not stored in the file(json:"-" tag is being used).

This change should improve the performance of DeletePAT method in DefaultAccountManager.

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/1016 **Author:** [@surik](https://github.com/surik) **Created:** 7/17/2023 **Status:** ✅ Merged **Merged:** 7/20/2023 **Merged by:** [@pascal-fischer](https://github.com/pascal-fischer) **Base:** `main` ← **Head:** `filestore-index-deletion-optimisation` --- ### 📝 Commits (1) - [`7ddde41`](https://github.com/netbirdio/netbird/commit/7ddde41c92d57625327df29d840e169f46aa584b) Do not persist filestore when deleting indices ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `management/server/file_store.go` (+2 -2) </details> ### 📄 Description ## Describe your changes Both `TokenID2UserID` and `HashedPAT2TokenID` are in-memory indices and not stored in the file(`json:"-"` tag is being used). This change should improve the performance of `DeletePAT` method in `DefaultAccountManager`. ## 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:07:49 -04:00
saavagebueno changed title from [PR #1016] Do not persist filestore when deleting indices to [PR #1016] [MERGED] Do not persist filestore when deleting indices 2026-08-05 03:08:28 -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#13227