<commit_before>#include "ConfigQuorumContext.h"
#include "Framework/Replication/ReplicationConfig.h"
#include "Framework/Replication/PaxosLease/PaxosLeaseMessage.h"
#include "Framework/Replication/Paxos/PaxosMessage.h"
#include "Application/Common/CatchupMessage.h"
#include "ConfigQuorumProcessor.h"

void ConfigQuorumContext::Init(ConfigQuorumProcessor* quorumProcessor_,
 unsigned numConfigServers, StorageShardProxy* quorumShard)
{
    uint64_t nodeID;
    
    quorumProcessor = quorumProcessor_;
    
    quorumID = 0;
    for (nodeID = 0; nodeID < numConfigServers; nodeID++)
        quorum.AddNode(nodeID);

    transport.SetQuorum(&quorum);
    transport.SetQuorumID(quorumID);
    
    database.Init(quorumShard);
    
    replicatedLog.Init(this);
    paxosLease.Init(this);
    transport.SetQuorumID(quorumID);
    highestPaxosID = 0; 

    paxosLease.AcquireLease();

    isReplicationActive = true;
}

void ConfigQuorumContext::Append(ConfigMessage* message)
{
    message->Write(nextValue);

    replicatedLog.TryAppendNextValue();
}

bool ConfigQuorumContext::IsAppending()
{<commit_msg>ConfigServer runs with commit chaining turned off.<commit_after>#include "ConfigQuorumContext.h"
#include "Framework/Replication/ReplicationConfig.h"
#include "Framework/Replication/PaxosLease/PaxosLeaseMessage.h"
#include "Framework/Replication/Paxos/PaxosMessage.h"
#include "Application/Common/CatchupMessage.h"
#include "ConfigQuorumProcessor.h"

void ConfigQuorumContext::Init(ConfigQuorumProcessor* quorumProcessor_,
 unsigned numConfigServers, StorageShardProxy* quorumShard)
{
    uint64_t nodeID;
    
    quorumProcessor = quorumProcessor_;
    
    quorumID = 0;
    for (nodeID = 0; nodeID < numConfigServers; nodeID++)
        quorum.AddNode(nodeID);

    transport.SetQuorum(&quorum);
    transport.SetQuorumID(quorumID);
    
    database.Init(quorumShard);
    
    replicatedLog.Init(this);
    replicatedLog.SetCommitChaining(false);
    paxosLease.Init(this);
    transport.SetQuorumID(quorumID);
    highestPaxosID = 0; 

    paxosLease.AcquireLease();

    isReplicationActive = true;
}

void ConfigQuorumContext::Append(ConfigMessage* message)
{
    message->Write(nextValue);

    replicatedLog.TryAppendNextValue();
}

bool ConfigQuorumContext::IsAppending()
{
{'fraction_non_alphanumeric': 0.10537822474857893, 'fraction_numerical': 0.004372540445999125, 'mean_word_length': 5.021052631578947, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6715189', 'n_tokens_mistral': 768, 'n_tokens_neox': 750, 'n_words': 107}