Fork me on GitHub
Kira Sotnikov09:03:51

Hi guys, are there a way to ask datomic about address of secondary (passive) instance of HA transactors? I've got a way to get Active instance details:

(datomic.peer/transactor-endpoint db-uri)

Kira Sotnikov09:03:12

I can't find a doc for datomic.peer lib for take a look on all methods


The active transactor writes its location into storage for Peers to find it. I don't think the passive transactor(s) record their location until they become active.

Kira Sotnikov13:03:35

stuartsierra: so I haven't another way except "get active and compare"?


I do not know of any mechanism in Datomic to find passive transactors.

Kira Sotnikov13:03:07

feature request simple_smile

Ben Kamphaus13:03:31

@lowl4tency: the issue here is that the passive transactor doesn’t write to storage, so there’s no way for a peer to get to it.

Ben Kamphaus13:03:21

If this is re: cloud formation ops - i.e., which instance to kill, you should kill at the cloud formation level. I.e., put up a new transactor pair, then when you see HeartMonitorMsec sum go up, kill the old transactor pair.

Ben Kamphaus13:03:25

This will force a failover to the new transactor pair (they’re ready to take over when they’re reporting HeartMonitorMsec metrics. Depending on whether or not there’s a standby at present (again discernible if anything is posting that metric), you can either wait for HeartMonitorMsec to show up again after being absent, or look at samples/count or sum values which will tell you that more than 1 standby transactor is ready to go.


I am trying to alter my schema. In order to prepare the addition of a unique constraint I added an index with something along the lines of

[{:db/id :person/external-id
  :db/index true
  :db.alter/_attribute :db.part/db}]
But now my transactor is dying with:
WARN  default    datomic.update - {:message "Index creation failed", :db-id “store-0b6b5518-0141-4392-b077-1729ea4464c7", :pid 1965, :tid 12} No such file or directory
        at Method) ~[na:1.8.0_72]
        at ~[na:1.8.0_72]
        at datomic.external_sort$temp_file_io$reify__2757.make_temp_file(external_sort.clj:22) ~[datomic-transactor-pro-0.9.5350.jar:na]
        at datomic.external_sort$file_system_sorter$fn__2850.invoke(external_sort.clj:113) ~[datomic-transactor-pro-0.9.5350.jar:na]
I am not sure what I am doing wrong here. I assume permissions for the default temp directory are wrong even though it does not seem like they are and /tmp exists. What is confusing to me is why this has not been an issue before. Does Datomic only create these temp files when I alter an existing schema to add an index?