Skip to content
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

bbolt be gone #1421

Closed
wants to merge 6 commits into from
Closed

Conversation

James-Pickett
Copy link
Contributor

No description provided.

@James-Pickett James-Pickett changed the title working without bbolt, need to iterate bbolt be gone Oct 24, 2023
pkg/osquery/extension.go Outdated Show resolved Hide resolved

}
}

func sortStoreKeys(s types.KVStore) ([][]byte, error) {
Copy link
Contributor Author

@James-Pickett James-Pickett Oct 25, 2023

Choose a reason for hiding this comment

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

so we need to sort the keys since the types.KVStore interface does not have the funcs Cursor().First(), Cursor().Next(), AutoIncrementKey(). Should we expand the interface or will this suffice?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hrm. ForEach is already an iterator. So I find I have questions...

  1. Why do you need sort here?
  2. Can we call ForEach directly
  3. Our ForEach has a bug -- by the docs, it should be a RO transaction, not an RW one

pkg/agent/storage/inmemory/keyvalue_store_in_memory.go Outdated Show resolved Hide resolved
pkg/osquery/extension.go Outdated Show resolved Hide resolved
pkg/osquery/extension_test.go Show resolved Hide resolved
@James-Pickett
Copy link
Contributor Author

closed in favor of #1652

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.

2 participants