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

fix: duplicate DRP call #432

Open
wants to merge 11 commits into
base: main
Choose a base branch
from
Open

Conversation

hoangquocvietuet
Copy link
Contributor

Resolved: #404

@sfroment sfroment force-pushed the fix/duplicate-drp-call branch from b6e40e3 to b42cc8b Compare February 5, 2025 20:45
packages/object/src/index.ts Show resolved Hide resolved
packages/object/src/index.ts Outdated Show resolved Hide resolved
packages/object/src/index.ts Show resolved Hide resolved
packages/object/src/index.ts Outdated Show resolved Hide resolved
Copy link

github-actions bot commented Feb 12, 2025

Flamegraph.com report

flamegraph.pprof
See in flamegraph.com

Created by Flamegraph.com Github Action

Signed-off-by: Sacha Froment <[email protected]>
Signed-off-by: Sacha Froment <[email protected]>
const callerName = new Error().stack?.split("\n")[2]?.trim().split(" ")[1];
if (callerName?.startsWith("DRPObject.resolveConflicts")) {
const startWithQuery = (propKey as string).startsWith("query_");
Copy link
Contributor

Choose a reason for hiding this comment

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

How does propKey differ from callerName in this context?

@@ -226,6 +227,11 @@ export class DRPObject implements ObjectPb.DRPObjectBase {

this.vertices.push(vertex);
this._notify("callFn", [vertex]);

if (!isACL) Object.assign(this.drp as DRP, drp);
else Object.assign(this.acl as ObjectACL, drp);
Copy link
Contributor

Choose a reason for hiding this comment

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

Why didn’t the old code include these lines?

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.

Fix duplicate DPR call
4 participants