-
Notifications
You must be signed in to change notification settings - Fork 911
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
Versioning data merge algo and hybrid logical clock utils #4205
Versioning data merge algo and hybrid logical clock utils #4205
Conversation
105151e
to
b565b4a
Compare
commonclock "go.temporal.io/server/common/clock" | ||
) | ||
|
||
var ErrClocksEqual = errors.New("HybridLogicalClocks are equal") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used?
// Merge and sort two sets of set IDs | ||
func setContainsSetIDs(set *persistencepb.CompatibleVersionSet, ids []string) bool { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wrong docstring
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This all makes sense to me
// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
// THE SOFTWARE. | ||
|
||
package hybrid_logical_clock |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does this really deserve a new package? just put it in common/clock
.. they're used together anyway so anyone importing this needs to import that too
@@ -150,6 +153,7 @@ func NewEngine( | |||
namespaceRegistry: namespaceRegistry, | |||
keyResolver: resolver, | |||
clusterMeta: clusterMeta, | |||
timeSource: clock.NewRealTimeSource(), // No need to mock this at the moment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we get this from fx instead? just for consistency. I can do it in another PR if you don't want to touch the fx stuff
Note: This commit came from a feature branch and is not expected to build.
…#4205) Note: This commit came from a feature branch and is not expected to build.
Note: This commit came from a feature branch and is not expected to build.
Note: This commit came from a feature branch and is not expected to build.
Another PR for version set / user data replication.