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

Len calculation in diodes #3

Closed
jeanbza opened this issue Apr 18, 2017 · 3 comments
Closed

Len calculation in diodes #3

jeanbza opened this issue Apr 18, 2017 · 3 comments

Comments

@jeanbza
Copy link

jeanbza commented Apr 18, 2017

re: #2

The diodes are frequently doing this thing:

idx := someUint64Variable % len(buffer)

Very, very occasionally data will be lost if the buffer length does not divide evenly into int64 = 18446744073709551615 . Probably not something worth stressing about, but thought I'd mention. The amount of data lost increases as the buffer size increases.

@poy
Copy link
Contributor

poy commented Apr 28, 2017

@jadekler Thanks for pointing this out. I'll look into fixing it.

@hev
Copy link

hev commented Aug 22, 2017

We are deleting the automatically generated story for this.

@cloudfoundry cloudfoundry deleted a comment from cf-gitbot Aug 22, 2017
@poy
Copy link
Contributor

poy commented Oct 26, 2017

@jadekler

I agree that there could be a gap when the read and write indexes overflow, however if we do some math we can demonstrate that the overflow won't happen in our lifetime (permitting a quantum computer does not adapt the diodes).

Even if we could get a computer that can write to a diode once a nanosecond, it would take 584.54 years.

We could mitigate the risk, however I think adding some docs to recommend a 2^x buffer length is recommended.

@poy poy closed this as completed in 9f270fb Oct 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants