Skip to content

Conversation

@seuros
Copy link

@seuros seuros commented Dec 1, 2025

This avoids having error when the caller send frozen strings.

@ioquatix
Copy link
Member

ioquatix commented Dec 1, 2025

I'm not sure I understand why this is desirable? If you have this scenario yourself, why not +buffer as the argument?

@seuros
Copy link
Author

seuros commented Dec 1, 2025

It happen on the async adapter such as https://github.com/seuros/activecypher/actions/runs/19809656365/job/56749520537

Let me check if i can fix it upstream.

@seuros seuros closed this Dec 1, 2025
@seuros
Copy link
Author

seuros commented Dec 1, 2025

just double checked, this gem freeze its internal StringBuffer instances for zero-copy reads.

The error happen only connection are interrupt or timeout. (Read operation timed out after 15s)

Right now it crash with FrozenError instead of the correct error.

This fixed it.

@seuros seuros reopened this Dec 1, 2025
@samuel-williams-shopify
Copy link
Contributor

I looked at the activecypher test suite and found various issues, e.g.:

      tasks = 5.times.map do |i|
        @connection.async_write_transaction do |tx|
          tx.run('CREATE (n:TestNode {name: $name, value: $value})',
                 { name: "concurrent-#{i}", value: i * 10 })
          i
        end
      end

You are creating 5 transactions all using the same connection / IO and they are potentially all racing on reads/writes. This can result in failures like the one you are seeing. I'll try to capture more details, but it looks like a test suite issue to me.

@samuel-williams-shopify
Copy link
Contributor

If you check this report you can see the root cause of the issue: https://github.com/samuel-williams-shopify/activecypher/actions/runs/19911580352/job/57081281300

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