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

tree: correct sizes for geospatial datums #54868

Merged
merged 1 commit into from
Sep 29, 2020

Conversation

otan
Copy link
Contributor

@otan otan commented Sep 28, 2020

These were previously inaccurate, which may result in OOMs.

Release note: None

@otan otan requested review from sumeerbhola and a team September 28, 2020 15:38
@cockroach-teamcity
Copy link
Member

This change is Reviewable

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

Reviewed 2 of 2 files at r1.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @otan)


pkg/sql/sem/tree/datum.go, line 2833 at r1 (raw file):

		bboxSize = unsafe.Sizeof(*bbox)
	}
	return unsafe.Sizeof(*d) + bboxSize + uintptr(len(d.EWKB()))

how about a SpatialObjectSize function and use it in both places?

These were previously inaccurate, which may result in OOMs.

Release note: None
Copy link
Contributor Author

@otan otan left a comment

Choose a reason for hiding this comment

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

Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @sumeerbhola)


pkg/sql/sem/tree/datum.go, line 2833 at r1 (raw file):

Previously, sumeerbhola wrote…

how about a SpatialObjectSize function and use it in both places?

Done.

Copy link
Collaborator

@sumeerbhola sumeerbhola left a comment

Choose a reason for hiding this comment

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

:lgtm:

Reviewed 2 of 2 files at r2.
Reviewable status: :shipit: complete! 1 of 0 LGTMs obtained (waiting on @sumeerbhola)

@otan
Copy link
Contributor Author

otan commented Sep 29, 2020

bors r=sumeerbhola

1 similar comment
@otan
Copy link
Contributor Author

otan commented Sep 29, 2020

bors r=sumeerbhola

@craig
Copy link
Contributor

craig bot commented Sep 29, 2020

Already running a review

@craig
Copy link
Contributor

craig bot commented Sep 29, 2020

Build succeeded:

@craig craig bot merged commit 991893b into cockroachdb:master Sep 29, 2020
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.

3 participants