Fork me on GitHub
#xtdb
<
2021-10-28
>
pinkfrog00:10:38

How does xtdb ensure the indexing is the same across different instance? For example, one instance has some custom predicate functions accessible, but another does not have. So when encountering a transaction that contains unknown predicate function, what should happen?

pinkfrog00:10:05

Sorry. Predicate is querying, so it shall have nothing to do with indexing.

pinkfrog00:10:23

But still, when HTTP server comes into play, then the server must have the functions defined though.

tatut04:10:51

I think you could break it by invoking something from a tx fn that isn't available on all nodes

✔️ 1
tatut04:10:28

the result of a tx fn is stored so, but it could break if there are 2 nodes concurrently indexing and arrive at a different result before it has been stored

✔️ 1
pinkfrog23:10:18

> the result of a tx fn is stored so, but it could break if there are 2 nodes concurrently indexing and arrive at a different result before it has been stored what part are you referring to? predicate function happens in query phase and not in the indexing phase.

tatut03:10:00

I'm referring to transaction functions

pinkfrog11:10:07

@U01AVNG2XNF Like this, if xtdb has some document on the best practice usage, that would be great.

Steven Deobald12:10:35

@UGC0NEP4Y We definitely have some "usage" and "modelling" docs in the works, but I'm not sure I completely understand this specific case. As @U11SJ6Q0K was explaining, you could (in theory) see 2 nodes go out of sync based on divergent tx-fns. Those sorts of peculiar edge cases are worth documenting and explaining, for sure. Do you still have a question about predicate functions, though? I can't think of a situation in which divergent predicates would cause indexing errors.

pinkfrog12:10:54

> I can’t think of a situation in which divergent predicates would cause indexing errors. Yup. It won’t.