Q:

Can state in a smart contract be immutable

My question is referring to immutability of smart contract data.
If I make a function in smart contract and write a conditional such that if a key of a map already exists jump out of the function and don't add it to the map.
i.e.
library Library {
  struct data {
     uint val;
     bool isValue;
   }
}

contract Array{
    using Library for Library.data;
    mapping(address => Library.data) map;
    function addCluster(address id) {
        if(map[id].isValue) throw; // duplicate key
        // else insert a key value pair 
    }
}

Is this state then immutable?
I've heard that if majority consensus of a private network agrees then they can reverse or 'roll back' already mined transactions and blocks. As stated in this article under the private blockchain section https://www.multichain.com/blog/2017/05/blockchain-immutability-myth/.
I'm trying to understand what happens consensus of a private network decide to roll back to a particular block before that transaction had been mined, will that key/value pair (state) be deleted? 
Thus asking can state be immutable if it was programmed to in the contract.

A:

It's not a matter of reorganizing the current state in light of changes to the past. Nothing can exist in the present that isn't the result of things that happened in the past. 
In the case that consensus shifts to a different description of the past, then a different present state is self-evident. The node may grind away a bit to reorganize internally but the internal logical consistency will be maintained. 
If you're a StarTrek or Stephan Hawking fan, it might suffice to understand that even in the unlikely case that someone builds a time machine, travels to the past and changes something, causality will not be violated. 
In the case of private chains touting rollback as a solution to errant contracts, the threshold consensus needed to do that is much lower than the comparable on public chains, because there are are fewer nodes in the consensus are they all known. In either case, the participants would be aware that there was a revision to the chain.
Hope it helps. 

