Giter VIP home page Giter VIP logo

Comments (10)

nberardi avatar nberardi commented on July 30, 2024

It seems to be a rare condition where the frequency is set exactly to zero by the 2nd condition that you identified. To be honest, I didn't write this code and it was sort of hard to follow what was going on. But I added a Math.Max(1, *) in the immutable object to make sure it is never zero.

from fluentcassandra.

igorberger avatar igorberger commented on July 30, 2024

Thanks for the fix. When do you think you'll tag it with a new verison?

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

I have a couple more pull requests to merge in then I will put out a point
release.

On Thu, Aug 23, 2012 at 7:11 PM, igorberger [email protected]:

Thanks for the fix. When do you think you'll tag it with a new verison?


Reply to this email directly or view it on GitHubhttps://github.com//issues/48#issuecomment-7987431.

from fluentcassandra.

igorberger avatar igorberger commented on July 30, 2024

I'm using 1.1.4 now and I noticed the following in the logs, which looks like an aftershock of this change:

System.ArgumentOutOfRangeException: The added or subtracted value results in an un-representable DateTime.
Parameter name: value
at System.DateTime.AddTicks(Int64 value)
at System.DateTimePrecise.GetUtcNow() in C:\FluentCassandra\V1.1.4\src\System\DateTimePrecise.cs:line 81
at FluentCassandra.FluentColumn..ctor(CassandraColumnSchema schema) in C:\FluentCassandra\V1.1.4\src\FluentColumn.cs:line 36
at FluentCassandra.Operations.Helper.ConvertColumnToFluentColumn(Column col, CassandraColumnSchema colSchema) in C:\FluentCassandra\V1.1.4\src\Operations\Helper.cs:line 205
at System.Linq.Enumerable.WhereSelectListIterator2.MoveNext() at FluentCassandra.FluentColumnList1..ctor(FluentColumnParent parent, IEnumerable1 columns) in C:\FluentCassandra\V1.1.4\src\FluentColumnList1.cs:line 35
at FluentCassandra.FluentColumnFamily..ctor(CassandraObject key, String columnFamily, CassandraColumnFamilySchema schema, IEnumerable1 columns) in C:\FluentCassandra\V1.1.4\src\FluentColumnFamily.cs:line 54 at FluentCassandra.Operations.MultiGetColumnFamilySlice.<Execute>d__5.MoveNext() in C:\FluentCassandra\V1.1.4\src\Operations\MultiGetColumnFamilySlice.cs:line 37 at System.Linq.Enumerable.SingleOrDefault[TSource](IEnumerable1 source)

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

I think ultimately, I am going to have to remove this DateTimePrecise. It gives a much more accurate resolution on the timestamp, but it is troublesome.

from fluentcassandra.

igorberger avatar igorberger commented on July 30, 2024

Thanks for keeping this issue open.

Is there something we can do in the meantime to avoid this problem, since it's actually affecting us?

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

Let me put out an emergency patch for you via NuGet it will be 1.1.6.

from fluentcassandra.

nberardi avatar nberardi commented on July 30, 2024

DateTimePrecise has been removed, I will be looking for ways to increase the resolution of the Standard DateTimeOffset object, but for right now we are just going to have to deal with it's resolution.

from fluentcassandra.

igorberger avatar igorberger commented on July 30, 2024

Thank you for a very quick fix.

from fluentcassandra.

edweip3 avatar edweip3 commented on July 30, 2024

Thanks! I was just about to comment on this issue.. the real problem with this class is that as time goes on, you get arithmetic overflow when doing the calculation, causing the division by zero problem. setting it to be 1 when it does become zero causes timestamp problem experience by @igorberger. Glad this is removed for now.

from fluentcassandra.

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.