Two-phase commit (2PC) protocol is a distributed algorithm that is used in zookeeper to coordinate all the processes that participate in a distributed transaction. Analyze the given statements regarding the 2PC protocol and select the correct option?
Statement A: 2PC protocol consists of three phases and in the first phase, coordinator nodes aks all the participating processes to prepare and vote to either commit or abort the transaction.
Statement B: If all participants voted for commit, it commits the transaction; otherwise, it aborts it. It finally notifies the result to all the participants.
Q 2. You are monitoring the Zookeeper service through the command port by using the four letter commands provided by Zookeeper. Which of the following commands will you use if you want the list of all outstanding sessions and ephemeral nodes?