/// <summary>
        /// This updates the Acl property or size proerty or both of the current node. This is called by a child node.
        /// If both are getting computed: For a directory we must update them together only. Meaning /Data should update both proerpties of / at the same time
        /// </summary>
        /// <param name="getAclProperty">True if we want the acl as one property</param>
        /// <param name="getSizeProperty">True if we want size as one property</param>
        /// <param name="childNode">Child node that is updating the parent node</param>
        /// <param name="checkBaseCase">Whether it is the base case or whether it is the case when we are going upo the tree</param>
        /// <returns></returns>
        private bool CheckAndUpdateProperties(bool getAclProperty, bool getSizeProperty, PropertyTreeNode childNode, bool checkBaseCase)
        {
            // Whether to compute Acl this turn- when we have reached end of tree i.e. there are no children (files and directories) or if child is a file or if we are recursively moving up
            bool computeAclThisTurn = !checkBaseCase || childNode.NoChildren();

            // Whether to compute size this turn- 1) if we are moving recursively up 2) when we have reached end of tree there are two options:
            //a) if we are getting Acl then we will only update size if it has no files and directories For ex: childNode is /Data which has few files under it. In this case we cannot update size of / with size of /Data because acl of files under /data is still not computed
            //b) if acl is not computed then just see if childnode has any directories or not. If it has files we do not need to wait since acl is not getting computed
            bool computeSizeThisTurn = !checkBaseCase || childNode.Type == DirectoryEntryType.DIRECTORY && (getAclProperty ? childNode.NoChildren() : childNode.NoDirectoryChildren());

            if (!(computeAclThisTurn || computeSizeThisTurn)) // If we do not have to compute acl or size property just return
            {
                return(false);
            }
            lock (_lock)
            {
                bool allProperty = true;
                // Logic below: One thread updates the size counter or acl counter or both. If a thread is updating acl counter
                // it might not update size counter so after updating acl it needs to check whether the size counters are already complete
                if (getSizeProperty)
                {
                    if (computeSizeThisTurn)
                    {
                        allProperty = UpdateNodeSize(childNode.TotChildDirec, childNode.TotChildFiles, childNode.TotChildSize);
                    }
                    else // This is the case where we are computing acl for a child file, so we do not need to calculate size
                    {// because that is already accounted in the parent directory size
                        allProperty = CheckAllChildDirectoryNodesCalculated();
                    }
                }
                if (getAclProperty)
                {
                    if (computeAclThisTurn)
                    {
                        allProperty = CompareAclAndUpdateChildAclProcessed(childNode) && allProperty;
                    }
                    else// Currently this will never arise
                    {
                        allProperty = CheckAllAclChildNodesProcessed() && allProperty;
                    }
                }
                if (PropertyTreeNodeLog.IsDebugEnabled)
                {
                    PropertyTreeNodeLog.Debug(
                        $"UpdateParentPorperty, allPropertyUpdated: {allProperty}, checkBase: {checkBaseCase}, JobEntryNode: {childNode.FullPath}, ParentNode: {FullPath}{(getSizeProperty ? $", TotChildSizeDone: {GetNumChildDirectoryProcessed()}/{ChildDirectoryNodes.Count}, TotFiles: {TotChildFiles}, TotDirecs: {TotChildDirec}, Totsizes: {TotChildSize}" : string.Empty)}{(getAclProperty ? $", TotChildAclDone: {GetNumChildsAclProcessed()}/{ChildDirectoryNodes.Count + ChildFileNodes.Count}, IsAclSameForAllChilds: {AllChildSameAcl}" : string.Empty)}");
                }
                return(allProperty);
            }
        }
        /// <summary>
        /// This update the Acl property or size proerty or both of the current node. This is called by a child node.
        /// </summary>
        /// <param name="getAclProperty">True if we want the acl as one property</param>
        /// <param name="getSizeProperty">True if we want size as one property</param>
        /// <param name="childNode">Child node that is updating the parent node</param>
        /// <param name="checkBaseCase">Whether it is the base case or whether it is the case when we are going upo the tree</param>
        /// <returns></returns>
        private bool CheckAndUpdateProperties(bool getAclProperty, bool getSizeProperty, PropertyTreeNode childNode, bool checkBaseCase)
        {
            // Whether to compute Acl this turn- when we have reached end of tree i.e. there are no children or if child is a file or if we are recursively moving up
            // Whether to compute size this turn- when we have reached end of tree i.e. there are no children directories or if we are moving recursively up
            bool computeAclThisTurn  = getAclProperty && (!checkBaseCase || childNode.NoChildren());
            bool computeSizeThisTurn = getSizeProperty && (!checkBaseCase || (childNode.Type == DirectoryEntryType.DIRECTORY && childNode.NoDirectoryChildren()));

            if (!(computeAclThisTurn || computeSizeThisTurn)) // If we do not have to compute acl or size property just return
            {
                return(false);
            }
            lock (_lock)
            {
                bool allProperty = true;
                // Logic below: One thread updates the size counter or acl counter or both. If a thread is updating acl counter
                // it might not update size counter so after updating acl it needs to check whether the size counters are already complete
                if (getSizeProperty)
                {
                    if (computeSizeThisTurn)
                    {
                        allProperty = UpdateNodeSize(childNode.TotChildDirec, childNode.TotChildFiles, childNode.TotChildSize);
                    }
                    else // This is the case where we are computing acl for a child file, so we do not need to calculate size
                    {// because that is already accounted in the parent directory size
                        allProperty = CheckAllChildDirectoryNodesCalculated();
                    }
                }
                if (getAclProperty)
                {
                    if (computeAclThisTurn)
                    {
                        allProperty = CompareAclAndUpdateChildAclProcessed(childNode.Acls.Entries, childNode.AllChildSameAcl) && allProperty;
                    }
                    else// Currently this will never arise
                    {
                        allProperty = CheckAllAclChildNodesProcessed() && allProperty;
                    }
                }
                return(allProperty);
            }
        }