Hacker News new | past | comments | ask | show | jobs | submit | tjungblut's comments login

Get a flipper, you can simply download and emulate all of them


could you be more specific on what's so hard to follow? it's quite literally just the implementation of the GRPC interface [1].

[1] https://github.com/etcd-io/etcd/blob/main/client/v3/kv.go#L3...


I was curious and dug into the Go client code. You linked to the definition of KV – the easiest way to create one is with NewKV [1], which internally creates a RetryKV [2] wrapper around the Client you give it.

RetryKV implements the KV methods by delegating to the underlying client. But before it delegates an immutable request (e.g., range), it sets the request retry policy to repeatable [3].

Retries are implemented with a gRPC interceptor, which checks the retry policy when deciding whether a request should be retried [4].

The Jepsen writeup says a client can retry a request when “the client can prove the first request could never execute, or that the request is idempotent”. In my (cold) read of the code, the Go client stays within those bounds.

For non-idempotent requests, the Go client only retries when it knows the request was never sent in the first place [5]. For idempotent requests, any response with gRPC status unavailable will be retried [6].

Unlike jetcd, the Go client’s retry behavior is safe.

[1] https://github.com/etcd-io/etcd/blob/main/client/v3/kv.go#L9... [2] https://github.com/etcd-io/etcd/blob/main/client/v3/retry.go... [3] https://github.com/etcd-io/etcd/blob/main/client/v3/retry_in... [4] https://github.com/etcd-io/etcd/blob/main/client/v3/retry_in... [5] https://github.com/etcd-io/etcd/blob/main/client/v3/retry.go... [6] https://github.com/etcd-io/etcd/blob/main/client/v3/retry.go...


Just dropping a comment to express my gratitude for sharing a breakdown of your interpretation. :)



The watch is a simple processing loop that receives and sends on a bi-directional GRPC channel. Leases have a similar loop for keep-alive messages, everything else is quite literally delegated.

I get that it's difficult to translate this 1:1 into Rust without channels and select primitives, but saying it's complex is wild. Try the server-side code for leases ;)


Inverting a binary tree became implementing SVD with arrays only.


Besides what Phil mentioned below, I can't write more than one record to the WAL. You're closing the file after every write, the second time you write the error `seek data/rebuf.tmp: file already closed` is returned.

I also think your rotation will delete the wrong segment when you have more than ten segments - imagine you're writing rebuf-1 to rebuf-10 - what's the "oldest file" to delete now? Besides, should you really delete those files?


Yes there are a lot of bugs since I just wrote this in one sitting today. Will be fixing all of this. For log rotation, I'll sort by the last_modified_at ts and then purge those


Your generational approach to segment numbering is fine, if you prepend enough zeros to format the files properly then you're also able to sort them correctly. etcd uses the same trick.


and why would the German red cross own it and sell it on Ebay? Ebay wasn't even a thing back when the DM was still around.


That's not true. I have a German eBay account from May 2001 when we still had the DM. eBay was very popular back then and had a completely different feeling because it was mostly used by private individuals for selling their stuff instead of mostly professional merchants like it is today.


That was the forgers error. At first he claimed he bought it from the Red Cross in 2001 and didn'tmention how, then he claimed it was one of the first items he bought on ebay in 2003/2004 and didn't mention from whom he bought it, implying he bought it inlcuding the invoice.


Germany has always been a rather privacy conscious country.

Even now, I suspect if that badge fell into the hands of most Germans, they would either try to return it to it's owner or shred it on the basis that it's someone else's private data.


This seems like a small CRUD app to replace apiserver/etcd with a nodejs app and mongodb.


Yep!


Two gaming Hatters from Austria? Of course it had to be Sanja and János. I will check your game later on deck, but congratulations on launching :)


I had exactly the same thought (Hi Tomas and Janos) :D

The game is really cool, well done! It feels like a modern twist on pacman, but with space alien snakes and upgradable super powers. Should make for a good lunch break game.


OMG we love that description, that kind of summarizes the game perfectly. (Also: :waveemoji:)


LOL small world indeed. :D


I had a dentist explain to me that my lip could go numb with a 50% chance after my wisdom teeth removal with that exact explanation just two minutes before the surgery. I was infuriated, turns out I was on the lucky side of her coin.


I could be wrong, but I really don’t think permanent loss of sensitivity is anywhere that high. Though it sounds low for temporary loss, but then it goes away after a couple of hours or so.


It can really depend on how badly impacted the wisdom teeth are. There's apparently a lot of nerve bundles around the back of the jaw bone. If they really need to dig in there to get it out there's a risk. I've had multiple dentists talk to me about my wisdom teeth and all have talked about there being some significant risks with mine.


Yep, that was for permanent loss.


Gameboy was THE mobile first platform when pokemon first came out. I see no issues here.


Odd, on my S22 it's just showing a black screen.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: