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

[Remote Segment Store] Add another instance of Store to InternalEngine that uses RemoteDirectory #2994

Closed
sachinpkale opened this issue Apr 20, 2022 · 2 comments
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request

Comments

@sachinpkale
Copy link
Member

Is your feature request related to a problem? Please describe.

  • The RemoteDirectory interface is defined as part of task.
  • This task creates an instance of Store, named remoteStore, which uses RemoteDirectory.
  • remoteStore is injected into InternalEngine. Goal is to use remoteStore to upload newly created segments as part of refresh flow.
@sachinpkale sachinpkale added enhancement Enhancement or improvement to existing feature or request untriaged labels Apr 20, 2022
@sachinpkale sachinpkale changed the title [Remote Segment Store] Add another instance of Store to InternalEngine which uses RemoteDirectory [Remote Segment Store] Add another instance of Store to InternalEngine that uses RemoteDirectory Apr 20, 2022
@sachinpkale
Copy link
Member Author

sachinpkale commented May 10, 2022

As I think more on this, there are 2 ways to access RemoteDirectory in InternalEngine:

  • Inject another instance of Store, called remoteStore into InternalEngine. This remoteStore will have instance of RemoteDirectory. With this approach, we have clear separation of store with remoteStore and don't have to change implementation of Store as the methods in Store are built against the Directory instance that the Store encapsulates.
  • Store to have instance of RemoteDirectory as well.
    • In this approach, instance of Store is created with 2 directories: first directoy is the same way it is created today, second instance would be instance of RemoteDirectory.
    • So, the concept is: Store will have 2 directories: primaryDirectory and secondaryDirectory. As both are directory instances, Store will not assume any implementation details of these directories. So, both the directories could be:
      • instance of FSDirectory,
      • instance of RemoteDirectory
      • primaryDirectory is instance of RemoteDirectory and secondaryDirectory is instance of FSDirectory
    • All the methods of store will continue to work on primaryDirectory and will have corresponding overloaded method which will take a boolean to indicate if to use primaryDirectory or secondaryDirectory.
    • In V1 of remote store:
      • we will add secondaryDirectroy to the store
      • primaryDirectory will still be called directory (we may take a call to change the name to primaryDirectory if required)
      • Store methods will only support primaryDirectory (methods will not be overloaded in V1)
      • Store will add a method to return an instance of secondaryDirectory (similar to directory() method).

With these two approaches, we are basically discussing the place to handle the RemoteDirectory instance. Whether it should be 1. in InternalEngine, as a part of RemoteStore or 2. in Store, as a secondaryDirectory.

@sachinpkale
Copy link
Member Author

PR link: #3285

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
distributed framework enhancement Enhancement or improvement to existing feature or request
Projects
None yet
Development

No branches or pull requests

2 participants