Skip to content

[Proposal] Repo level settings to achieve full consistency #2491

Closed as not planned

Description

@itaiad200

The current mechanism of repo level settings stores them in the object store. Objects are cached in each lakeFS server for 1 sec, which makes the current mechanism to be eventual consistent - lakeFS is guaranteed to work by the new settings after 1 second has elapsed. Also, the number of calls to fetch the settings is 1/sec, which is not ideal.

With the current use of postgres as the locking mechanism for operations like committing, and the future use of the abstracted SetIf function described in #2466, we can achieve full consistency for the repo level settings as well, without paying for it with additional object-store calls.

Suggestion:
Repo level settings will be stored as immutable files in the object store. A mapping between the repo and the current settings object will be stored in any KV store we'll use. Any change to the settings will:

  1. First read the up-to-date immutable settings file from the object-store.
  2. Perform the changes.
  3. Save the new immutable settings file to the object-store.
  4. Use the SetIf function to update the mapping, only if the mapping wasn't changed from the last read.

Since the settings files are now immutable, they can be cached in the server side (using pyramid), thus every file will only be read once from the object-store and not every call.

Activity

  1. arielshaqed commented on Sep 27, 2021

    @arielshaqed
    Contributor

    As you might imagine, I support making such a change.

    However, it is pretty much identical to storing configurations using the full lakeFS mechanism, on some separate repository with a protected name (one that cannot be directly named using the API). The only difference would be that that solution would have less sensitive code and would also track history.

    We decided not to go with such a solution. You and I disagreed and committed. I believe that we should use this issue to set out in writing why we rejected this solution (and presumably close it). Then we never have to rehash the arguments.

  2. itaiad200 commented on Sep 27, 2021

    @itaiad200
    ContributorAuthor

    One of the key arguments of choosing the direction we currently have, is to avoid adding more strings to our postgres transaction logic that would be hard to replace later on. Looking at proposal #2466 I see that it would be achievable.
    I didn't think that this proposal resembles this much the previous ones, otherwise I would not have raised a suggestion that overrules a previous decision we made. If you both feel we discussed this before, then by all means let's add the arguments here (or reference them if they existed in the PR) and close this one.

  3. itaiad200 commented on Sep 29, 2021

    @itaiad200
    ContributorAuthor

    Reopening since #2369 focuses on the feature of branch protection and not on how to store repo settings on a lakeFS repo.

  4. github-actions commented on Nov 1, 2023

    @github-actions

    This issue is now marked as stale after 90 days of inactivity, and will be closed soon. To keep it, mark it with the "no stale" label.

  5. github-actions commented on Nov 12, 2023

    @github-actions

    Closing this issue because it has been stale for 7 days with no activity.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions