Giter VIP home page Giter VIP logo

Comments (4)

0x6e6562 avatar 0x6e6562 commented on September 26, 2024

Thanks for reporting this - do you have an example that we can use to reproduce the issue?

from cqlc.

mirkomikulic avatar mirkomikulic commented on September 26, 2024

Unfortunately not really. That happens on a regular insert.
It usually happens after a couple of hours of runtime. I'm using negroni and negronicql.

I was thinking that maybe the connection to cassandra gets dropped - but I'm not really sure.

It's also interesting why the entire webapp crashes, not just the current goroutine.

from cqlc.

mirkomikulic avatar mirkomikulic commented on September 26, 2024

I think I got it:
I had a race condition in which the context was being shared. :/ silly me.

I'll open another issue should this issue still arise. Thanks a lot!

from cqlc.

0x6e6562 avatar 0x6e6562 commented on September 26, 2024

The docs aren't very clear about the thread safety of the context object, so maybe this issue indicates that the docs require some improvement.

Basically the context instance is inherently not thread safe because it needs to accumulate state to build the statement.

The design philosophy is that the cqlc library should be as unobtrusive as possible, which also means that it doesn't hold any locks on behalf of the calling application.

One could imagine a scenario whereby the result of the fluent API is somehow cached or memoized to an immutable statement - this might play better in a multi threaded situation.

from cqlc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.