René's URL Explorer Experiment


Title: RocksDB read-write store: by_guid fails or returns another entity for added or changed GlobalIds · Issue #9827 · IfcOpenShell/IfcOpenShell · GitHub

Open Graph Title: RocksDB read-write store: by_guid fails or returns another entity for added or changed GlobalIds · Issue #9827 · IfcOpenShell/IfcOpenShell

X Title: RocksDB read-write store: by_guid fails or returns another entity for added or changed GlobalIds · Issue #9827 · IfcOpenShell/IfcOpenShell

Description: Version: ifcopenshell 0.9.0 (PyPI wheel) and 0.9.1a261005, macOS arm64, Python 3.12 and 3.13. Found while checking #9822. Summary On a read-write RocksDB store, by_guid is wrong for any GlobalId written after the store was opened: an ent...

Open Graph Description: Version: ifcopenshell 0.9.0 (PyPI wheel) and 0.9.1a261005, macOS arm64, Python 3.12 and 3.13. Found while checking #9822. Summary On a read-write RocksDB store, by_guid is wrong for any GlobalId wr...

X Description: Version: ifcopenshell 0.9.0 (PyPI wheel) and 0.9.1a261005, macOS arm64, Python 3.12 and 3.13. Found while checking #9822. Summary On a read-write RocksDB store, by_guid is wrong for any GlobalId wr...

Opengraph URL: https://github.com/IfcOpenShell/IfcOpenShell/issues/9827

X: @github

direct link

Domain: github.com

IPv4 address: 140.82.114.3


Hey, it has json ld scripts:
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"RocksDB read-write store: by_guid fails or returns another entity for added or changed GlobalIds","articleBody":"**Version:** ifcopenshell 0.9.0 (PyPI wheel) and 0.9.1a261005, macOS arm64, Python 3.12 and 3.13. Found while checking #9822.\n\n## Summary\n\nOn a read-write RocksDB store, `by_guid` is wrong for any GlobalId written after the store was opened: an entity added with `create_entity`, or an existing entity whose `GlobalId` was changed. Depending on the model it either raises `Instance #N not found` for an id that was never used, or returns a different, unrelated entity with no error. GlobalIds that were in the file when it was converted resolve correctly.\n\n## Reproduction\n\n```python\nimport ifcopenshell, ifcopenshell.api.root, ifcopenshell.guid, os, shutil, sys, tempfile\nprint(\"ifcopenshell\", ifcopenshell.version)\nsrc = sys.argv[1]\nd = tempfile.mkdtemp()\nconv = os.path.join(d, \"m.converting\"); rdb = os.path.join(d, \"m.rdb\")\nifcopenshell.convert_path_to_rocksdb(src, conv); os.rename(conv, rdb)\nf = ifcopenshell.open(src)\nroots = f.by_type(\"IfcRoot\")\ng = ifcopenshell.open(rdb, readonly=False)\nok = 0\nfor e in roots:\n    try:\n        if g.by_guid(e.GlobalId).id() == e.id(): ok += 1\n    except Exception: pass\nprint(\"existing guids resolved:\", ok, \"of\", len(roots))\nnew_guid = ifcopenshell.guid.new()\nw = g.create_entity(\"IfcBuildingElementProxy\", GlobalId=new_guid, Name=\"ADDED\")\nprint(\"added: id\", w.id(), \"class\", w.is_a())\ntry:\n    r = g.by_guid(new_guid)\n    print(\"by_guid(new) ->\", \"id\", r.id(), r.is_a(), getattr(r, \"Name\", None), \"| same entity:\", r.id() == w.id())\nexcept Exception as ex:\n    print(\"by_guid(new) raised:\", type(ex).__name__, ex)\ne0 = g.by_id(roots[0].id()); changed = ifcopenshell.guid.new(); e0.GlobalId = changed\ntry:\n    r = g.by_guid(changed)\n    print(\"by_guid(changed) ->\", \"id\", r.id(), r.is_a(), \"| same entity:\", r.id() == e0.id())\nexcept Exception as ex:\n    print(\"by_guid(changed) raised:\", type(ex).__name__, ex)\nshutil.rmtree(d, ignore_errors=True)\n```\n\nRun as `python repro.py model.ifc`. Results, identical on 0.9.0 and 0.9.1a261005:\n\n| Model | existing GlobalIds | `by_guid` of an added entity | `by_guid` after changing a GlobalId |\n|---|---|---|---|\n| `test/input/539--rotated-studs--augmented.ifc` (IFC4, 9,937 entities) | 2341 of 2341 | `RuntimeError: Instance #24780 not found` (the added entity is #11752) | `RuntimeError: Instance #22439 not found` |\n| `test/input/706--buildingElementProxy--segfault--accept-errors.ifc` (IFC2X3, 638,340 entities) | 2 of 2 | returns #1276699, an IfcCartesianPoint (the added entity is #2002798) | returns #1276697, an IfcCartesianPoint |\n\nThe second row is the dangerous one: a lookup by GlobalId hands back another entity.\n\n## Likely cause (read from the source, not confirmed by a build)\n\n`src/ifcparse/file.cpp:161` on v0.9.0:\n\n```cpp\nbyguid_(&byguid_internal_, [this](size_t v) { return assert_existance(v, entityinstance_ref); }, [](const express::base& v) { return v.identity(); })\n```\n\nThe write side stores `v.identity()`, while the read side looks the stored number up as an instance name. The streaming converter writes instance names under `g|` (74b405a9f7), which is why converted GlobalIds resolve. The next line carries a `@todo by_identity is probably not correct here`.\n\n## Expected\n\n`by_guid` returns the entity that carries the GlobalId, or raises if none does.\n\nNot tested: Linux and Windows wheels for this case, and the tip of v0.9.0 beyond the 261005 alpha.\n","author":{"url":"https://github.com/petruconduraru","@type":"Person","name":"petruconduraru"},"datePublished":"2026-10-06T11:06:20Z","url":"https://github.com/IfcOpenShell/IfcOpenShell/issues/9827"}

react-profiling0
react-import-mapreact,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322
route-pattern/_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format)
route-controllervoltron_issues_fragments
route-actionissue_layout
fetch-noncev2:f39811b5-7077-f353-dd36-f863e4a44b74
current-catalog-service-hash81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114
request-idDFDE:124D68:2CCC36:3D96A2:6B04B9F8
html-safe-nonce8b97e4518c9306c6356ab5ff92fabc60071701b4c2d1ebc6717b57c8592f6c55
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERkRFOjEyNEQ2ODoyQ0NDMzY6M0Q5NkEyOjZCMDRCOUY4IiwidmlzaXRvcl9pZCI6IjQzMjE4MTMwMjk1MzM4MjU1MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ==
visitor-hmaca4e84245c5b9c14d0baeb3a34d266a3450cb272538814cb8d94d63ee4e7f61ca
hovercard-subject-tagissue:5727321272
github-keyboard-shortcutsrepository,issues,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///voltron/issues_fragments/issue_layout
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/IfcOpenShell/IfcOpenShell/9827/issue_layout
twitter:imagehttps://opengraph.githubassets.com/3d6491ea7179eedde3ba092d5fe9c22c96126866ff18d5dd68f56e6ced854554/IfcOpenShell/IfcOpenShell/issues/9827
twitter:cardsummary_large_image
og:imagehttps://opengraph.githubassets.com/3d6491ea7179eedde3ba092d5fe9c22c96126866ff18d5dd68f56e6ced854554/IfcOpenShell/IfcOpenShell/issues/9827
og:image:altVersion: ifcopenshell 0.9.0 (PyPI wheel) and 0.9.1a261005, macOS arm64, Python 3.12 and 3.13. Found while checking #9822. Summary On a read-write RocksDB store, by_guid is wrong for any GlobalId wr...
og:image:width1200
og:image:height600
og:site_nameGitHub
og:typeobject
og:author:usernamepetruconduraru
hostnamegithub.com
expected-hostnamegithub.com
None378bd702ac792b3550e484ad39d9a898fcd25bb52ba6962b0c9cc457c1ea71c7
turbo-cache-controlno-preview
go-importgithub.com/IfcOpenShell/IfcOpenShell git https://github.com/IfcOpenShell/IfcOpenShell.git
octolytics-dimension-user_id13692563
octolytics-dimension-user_loginIfcOpenShell
octolytics-dimension-repository_id40473201
octolytics-dimension-repository_nwoIfcOpenShell/IfcOpenShell
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id40473201
octolytics-dimension-repository_network_root_nwoIfcOpenShell/IfcOpenShell
turbo-body-classeslogged-out env-production page-responsive
disable-turbofalse
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
releaseb032e77f1ea437ede6c115446a0a467709b468e7
ui-targetfull
theme-color#1e2327
color-schemelight dark
react-app-nameissues

Links:

Skip to contenthttps://github.com/IfcOpenShell/IfcOpenShell/issues/9827#start-of-content
https://github.com/
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9827
GitHubRepository hosting, code review, and collaborationhttps://github.com/platform
CopilotAI coding agent for tasks, projects, and automated workhttps://github.com/features/copilot
ActionsCI/CD and automationhttps://github.com/features/actions
Code QualityQuality analysis, fixes, and enforcementhttps://github.com/features/code-quality
CodespacesCloud development environmentshttps://github.com/features/codespaces
Code SecurityVulnerability detection and remediationhttps://github.com/security/advanced-security/code-security
Secret ProtectionSecret scanning and leak preventionhttps://github.com/security/advanced-security/secret-protection
All Featureshttps://github.com/features
Documentationhttps://docs.github.com/en
Traininghttps://learn.github.com/skills
Certificationshttps://learn.github.com/credentials
Build with Copilothttps://github.com/features/ai
Customize Copilothttps://docs.github.com/en/copilot/how-tos/copilot-on-github/customize-copilot/customize-copilot-overview
Integrationshttps://github.com/marketplace
Trending reposhttps://github.com/trending
GitHub Sponsorshttps://github.com/open-source/sponsors
Developer articleshttps://github.com/resources/articles
ChangelogYour source for the latest features, improvements, and fixes across GitHub products, all in one place.https://github.blog/changelog/
Enterpriseshttps://github.com/enterprise
Teamhttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
See all industrieshttps://github.com/solutions/industry
Why GitHubhttps://github.com/why-github
Customer Storieshttps://github.com/customer-stories
Business insightshttps://github.com/solutions/executive-insights
Trust Centerhttps://github.com/trust-center
GitHub Advanced SecurityEnterprise-grade code securityhttps://github.com/security/advanced-security
Copilot for businessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/enterprise/premium-support
Documentationhttps://docs.github.com/en
Resource centerhttps://github.com/resources
Bloghttps://github.blog/
Events & webinarshttps://github.com/resources/events
Community Forumhttps://github.com/orgs/community/discussions
Customer Storieshttps://github.com/customer-stories
Integrationshttps://github.com/marketplace
Customer supporthttps://help.github.com/
Traininghttps://learn.github.com/skills
GitHub Statushttps://www.githubstatus.com/
Abouthttps://github.com/about
Partnershttps://github.com/partners
Changeloghttps://github.blog/changelog/
GitHub UniverseThe event for developers, by developers — talks, workshops, and what’s next for GitHub.https://githubuniverse.com/
Pricinghttps://github.com/pricing
Sign inhttps://github.com/login?return_to=https%3A%2F%2Fgithub.com%2FIfcOpenShell%2FIfcOpenShell%2Fissues%2F9827
Sign uphttps://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fvoltron%2Fissues_fragments%2Fissue_layout&source=header-repo&source_repo=IfcOpenShell%2FIfcOpenShell
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9827
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9827
Reloadhttps://github.com/IfcOpenShell/IfcOpenShell/issues/9827
IfcOpenShellhttps://github.com/IfcOpenShell
IfcOpenShellhttps://github.com/IfcOpenShell/IfcOpenShell
Codehttps://github.com/IfcOpenShell/IfcOpenShell
Issues1.2k (1.2k)https://github.com/IfcOpenShell/IfcOpenShell/issues
Pull requests939 (939)https://github.com/IfcOpenShell/IfcOpenShell/pulls
Discussionshttps://github.com/IfcOpenShell/IfcOpenShell/discussions
Actionshttps://github.com/IfcOpenShell/IfcOpenShell/actions
Projectshttps://github.com/IfcOpenShell/IfcOpenShell/projects
Wikihttps://github.com/IfcOpenShell/IfcOpenShell/wiki
Security and qualityhttps://github.com/IfcOpenShell/IfcOpenShell/security
Insightshttps://github.com/IfcOpenShell/IfcOpenShell/insights
https://github.com/IfcOpenShell/IfcOpenShell
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9827
New issuehttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9827
#9828https://github.com/IfcOpenShell/IfcOpenShell/pull/9828
RocksDB read-write store: by_guid fails or returns another entity for added or changed GlobalIdshttps://github.com/IfcOpenShell/IfcOpenShell/issues/9827#top
#9828https://github.com/IfcOpenShell/IfcOpenShell/pull/9828
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com/petruconduraru
petruconduraruhttps://github.com/petruconduraru
on Oct 6, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9827#issue-5727321272
#9822https://github.com/IfcOpenShell/IfcOpenShell/issues/9822
74b405ahttps://github.com/IfcOpenShell/IfcOpenShell/commit/74b405a9f7bb74f17b14f892a5dd53ab0e4c5523
petruconduraruhttps://github.com/petruconduraru
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
on Oct 6, 2026https://github.com/IfcOpenShell/IfcOpenShell/issues/9827#event-32595661718
Sign up for freehttps://github.com/signup?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9827
Sign in to commenthttps://github.com/login?return_to=https://github.com/IfcOpenShell/IfcOpenShell/issues/9827
PR Proposedhttps://github.com/IfcOpenShell/IfcOpenShell/issues?q=state%3Aopen%20label%3A%22PR%20Proposed%22
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Response headers:
Servergithub.com
Content-Typetext/html; charset=utf-8
Cache-Controlmax-age=0, private, must-revalidate

Viewport: width=device-width


URLs of crawlers that visited me.