local g={}g.__index=g function g.LoadProfileAsync(C,g,G,F)if C._profile_template==nil then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \080\114\111\102\105\108\101 \116\101\109\112\108\097\116\101 \110\111\116 \115\101\116 - \080\114\111\102\105\108\101\083\116\111\114\101\058\076\111\097\100\080\114\111\102\105\108\101\065\115\121\110\099\040\041 \108\111\099\107\101\100 \102\111\114 \116\104\105\115 \080\114\111\102\105\108\101\083\116\111\114\101")end if type(g)~="\115\116\114\105\110\103"then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \112\114\111\102\105\108\101\095\107\101\121 \109\117\115\116 \098\101 \097 \115\116\114\105\110\103")elseif string.len(g)==0 then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \112\114\111\102\105\108\101\095\107\101\121")end if type(G)~="\102\117\110\099\116\105\111\110"and(G~="\070\111\114\099\101\076\111\097\100"and G~="\083\116\101\097\108")then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \110\111\116\095\114\101\108\101\097\115\101\100\095\104\097\110\100\108\101\114")end if ProfileService.ServiceLocked==true then return nil end WaitForPendingProfileStore(C)local a=F==UseMockTag for G,F in ipairs(ActiveProfileStores)do if F._profile_store_lookup==C._profile_store_lookup then local G=a==true and F._mock_loaded_profiles or F._loaded_profiles if G[g]~=nil then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \080\114\111\102\105\108\101 "..(IdentifyProfile(C._profile_store_name,C._profile_store_scope,g).." \105\115 \097\108\114\101\097\100\121 \108\111\097\100\101\100 \105\110 \116\104\105\115 \115\101\115\115\105\111\110"))end end end ActiveProfileLoadJobs=ActiveProfileLoadJobs+1 local N=G=="\070\111\114\099\101\076\111\097\100"local u=0 local o=N local f=false local R=G=="\083\116\101\097\108"while ProfileService.ServiceLocked==false do local F=a==true and C._mock_profile_load_jobs or C._profile_load_jobs local l local n=LoadIndex+1 LoadIndex=n local s=F[g]if s~=nil then s[1]=n while s[2]==nil do Madwork.HeartbeatWait()end if s[1]==n then l=s[2]F[g]=nil else ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return nil end else s={n;nil}F[g]=s s[2]=StandardProfileUpdateAsyncDataStore(C,g,{ExistingProfileHandle=function(g)if ProfileService.ServiceLocked==false then local G=g.MetaData.ActiveSession local F=g.MetaData.ForceLoadSession if G==nil then g.MetaData.ActiveSession={PlaceId;JobId}g.MetaData.ForceLoadSession=nil elseif type(G)=="\116\097\098\108\101"then if IsThisSession(G)==false then local G=g.MetaData.LastUpdate if G~=nil then if os.time()-G>SETTINGS.AssumeDeadSessionLock then g.MetaData.ActiveSession={PlaceId,JobId}g.MetaData.ForceLoadSession=nil return end end if f==true or R==true then local G=false if F~=nil then G=IsThisSession(F)end if G==true or R==true then g.MetaData.ActiveSession={PlaceId;JobId}g.MetaData.ForceLoadSession=nil end elseif o==true then g.MetaData.ForceLoadSession={PlaceId;JobId}end else g.MetaData.ForceLoadSession=nil end end end end;MissingProfileHandle=function(g)g.Data=DeepCopyTable(C._profile_template)g.MetaData={ProfileCreateTime=os.time(),SessionLoadCount=0;ActiveSession={PlaceId;JobId};ForceLoadSession=nil,MetaTags={}}end;EditProfile=function(g)if ProfileService.ServiceLocked==false then local G=g.MetaData.ActiveSession if G~=nil and IsThisSession(G)==true then g.MetaData.SessionLoadCount=g.MetaData.SessionLoadCount+1 g.MetaData.LastUpdate=os.time()end end end},a)if s[1]==n then l=s[2]F[g]=nil else ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return nil end end if l~=nil then local F=l.MetaData.ActiveSession if type(F)=="\116\097\098\108\101"then if IsThisSession(F)==true then l.MetaData.MetaTagsLatest=DeepCopyTable(l.MetaData.MetaTags)local G={_updates_latest=l.GlobalUpdates,_pending_update_lock={};_pending_update_clear={};_new_active_update_listeners=Madwork.NewScriptSignal(),_new_locked_update_listeners=Madwork.NewScriptSignal(),_profile=nil}setmetatable(G,GlobalUpdates)local F={Data=l.Data;MetaData=l.MetaData,MetaTagsUpdated=Madwork.NewScriptSignal(),GlobalUpdates=G;_profile_store=C;_profile_key=g,_release_listeners=Madwork.NewScriptSignal();_hop_ready_listeners=Madwork.NewScriptSignal();_hop_ready=false;_load_timestamp=os.clock(),_is_user_mock=a}setmetatable(F,Profile)G._profile=F if next(C._loaded_profiles)==nil and next(C._mock_loaded_profiles)==nil then table.insert(ActiveProfileStores,C)end if a==true then C._mock_loaded_profiles[g]=F else C._loaded_profiles[g]=F end AddProfileToAutoSave(F)if ProfileService.ServiceLocked==true then SaveProfileAsync(F,true)F=nil end ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return F else if N==true then local g=l.MetaData.ForceLoadSession local G=false if g~=nil then G=IsThisSession(g)end if G==true then if o==false then u=u+1 if u==SETTINGS.ForceLoadMaxSteps then f=true end end Madwork.HeartbeatWait()else ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return nil end o=false elseif R==true then Madwork.HeartbeatWait()else local a=G(F[1],F[2])if a=="\082\101\112\101\097\116"then Madwork.HeartbeatWait()elseif a=="\067\097\110\099\101\108"then ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return nil elseif a=="\070\111\114\099\101\076\111\097\100"then N=true o=true Madwork.HeartbeatWait()elseif a=="\083\116\101\097\108"then R=true Madwork.HeartbeatWait()else error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \114\101\116\117\114\110 \102\114\111\109 \110\111\116\095\114\101\108\101\097\115\101\100\095\104\097\110\100\108\101\114 \040\""..(tostring(a)..("\"\041\040"..(type(a)..("\041\059"..("\n"..(IdentifyProfile(C._profile_store_name,C._profile_store_scope,g)..(" \084\114\097\099\101\098\097\099\107\058\n"..debug.traceback()))))))))end end end else ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return nil end else Madwork.HeartbeatWait()end end ActiveProfileLoadJobs=ActiveProfileLoadJobs-1 return nil end function g.GlobalUpdateProfileAsync(C,g,G,F)if type(g)~="\115\116\114\105\110\103"or string.len(g)==0 then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \112\114\111\102\105\108\101\095\107\101\121")end if type(G)~="\102\117\110\099\116\105\111\110"then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \117\112\100\097\116\101\095\104\097\110\100\108\101\114")end if ProfileService.ServiceLocked==true then return nil end WaitForPendingProfileStore(C)while ProfileService.ServiceLocked==false do local a=StandardProfileUpdateAsyncDataStore(C,g,{ExistingProfileHandle=nil;MissingProfileHandle=nil,EditProfile=function(g)local F={_updates_latest=g.GlobalUpdates,_update_handler_mode=true}setmetatable(F,GlobalUpdates)G(F)end},F==UseMockTag)CustomWriteQueueMarkForCleanup(C._profile_store_lookup,g)if a~=nil then local g={_updates_latest=a.GlobalUpdates}setmetatable(g,GlobalUpdates)return g else Madwork.HeartbeatWait()end end return nil end function g.ViewProfileAsync(F,g,G)if type(g)~="\115\116\114\105\110\103"or string.len(g)==0 then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \112\114\111\102\105\108\101\095\107\101\121")end if ProfileService.ServiceLocked==true then return nil end WaitForPendingProfileStore(F)while ProfileService.ServiceLocked==false do local C=StandardProfileUpdateAsyncDataStore(F,g,{ExistingProfileHandle=nil,MissingProfileHandle=nil;EditProfile=nil},G==UseMockTag)CustomWriteQueueMarkForCleanup(F._profile_store_lookup,g)if C~=nil then local G={_updates_latest=C.GlobalUpdates;_profile=nil}setmetatable(G,GlobalUpdates)local a={Data=C.Data;MetaData=C.MetaData;MetaTagsUpdated=Madwork.NewScriptSignal(),GlobalUpdates=G;_profile_store=F,_profile_key=g;_view_mode=true,_load_timestamp=os.clock()}setmetatable(a,Profile)G._profile=a return a else Madwork.HeartbeatWait()end end return nil end function g.WipeProfileAsync(F,g,G)if type(g)~="\115\116\114\105\110\103"or string.len(g)==0 then error("\091\080\114\111\102\105\108\101\083\101\114\118\105\099\101\093\058 \073\110\118\097\108\105\100 \112\114\111\102\105\108\101\095\107\101\121")end if ProfileService.ServiceLocked==true then return false end WaitForPendingProfileStore(F)local C=StandardProfileUpdateAsyncDataStore(F,g,{WipeProfile=true},G==UseMockTag)CustomWriteQueueMarkForCleanup(F._profile_store_lookup,g)return C end


local ProfileStore = {
	--[[
		Mock = {},
	
		_profile_store_name = "", -- [string] -- DataStore name
		_profile_store_scope = nil, -- [string] or [nil] -- DataStore scope
		_profile_store_lookup = "", -- [string] -- _profile_store_name .. "\0" .. (_profile_store_scope or "")
		
		_profile_template = {}, -- [table]
		_global_data_store = global_data_store, -- [GlobalDataStore] -- Object returned by DataStoreService:GetDataStore(_profile_store_name)
		
		_loaded_profiles = {[profile_key] = Profile, ...},
		_profile_load_jobs = {[profile_key] = {load_id, loaded_data}, ...},
		
		_mock_loaded_profiles = {[profile_key] = Profile, ...},
		_mock_profile_load_jobs = {[profile_key] = {load_id, loaded_data}, ...},
	--]]
}
ProfileStore.__index = ProfileStore

function ProfileStore:LoadProfileAsync(profile_key, not_released_handler, _use_mock) --> [Profile / nil] not_released_handler(place_id, game_job_id)
	if self._profile_template == nil then
		error("[ProfileService]: Profile template not set - ProfileStore:LoadProfileAsync() locked for this ProfileStore")
	end
	if type(profile_key) ~= "string" then
		error("[ProfileService]: profile_key must be a string")
	elseif string.len(profile_key) == 0 then
		error("[ProfileService]: Invalid profile_key")
	end
	if type(not_released_handler) ~= "function" and not_released_handler ~= "ForceLoad" and not_released_handler ~= "Steal" then
		error("[ProfileService]: Invalid not_released_handler")
	end

	if ProfileService.ServiceLocked == true then
		return nil
	end

	WaitForPendingProfileStore(self)

	local is_user_mock = _use_mock == UseMockTag

	-- Check if profile with profile_key isn't already loaded in this session:
	for _, profile_store in ipairs(ActiveProfileStores) do
		if profile_store._profile_store_lookup == self._profile_store_lookup then
			local loaded_profiles = is_user_mock == true and profile_store._mock_loaded_profiles or profile_store._loaded_profiles
			if loaded_profiles[profile_key] ~= nil then
				error("[ProfileService]: Profile " .. IdentifyProfile(self._profile_store_name, self._profile_store_scope, profile_key) .. " is already loaded in this session")
				-- Are you using Profile:Release() properly?
			end
		end
	end

	ActiveProfileLoadJobs = ActiveProfileLoadJobs + 1
	local force_load = not_released_handler == "ForceLoad"
	local force_load_steps = 0
	local request_force_load = force_load -- First step of ForceLoad
	local steal_session = false -- Second step of ForceLoad
	local aggressive_steal = not_released_handler == "Steal" -- Developer invoked steal
	while ProfileService.ServiceLocked == false do
		-- Load profile:
		-- SPECIAL CASE - If LoadProfileAsync is called for the same key before another LoadProfileAsync finishes,
		-- yoink the DataStore return for the new call. The older call will return nil. This would prevent very rare
		-- game breaking errors where a player rejoins the server super fast.
		local profile_load_jobs = is_user_mock == true and self._mock_profile_load_jobs or self._profile_load_jobs
		local loaded_data
		local load_id = LoadIndex + 1
		LoadIndex = load_id
		local profile_load_job = profile_load_jobs[profile_key] -- {load_id, loaded_data}
		if profile_load_job ~= nil then
			profile_load_job[1] = load_id -- Yoink load job
			while profile_load_job[2] == nil do -- Wait for job to finish
				Madwork.HeartbeatWait()
			end
			if profile_load_job[1] == load_id then -- Load job hasn't been double-yoinked
				loaded_data = profile_load_job[2]
				profile_load_jobs[profile_key] = nil
			else
				ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
				return nil
			end
		else
			profile_load_job = {load_id, nil}
			profile_load_jobs[profile_key] = profile_load_job
			profile_load_job[2] = StandardProfileUpdateAsyncDataStore(
				self,
				profile_key,
				{
					ExistingProfileHandle = function(latest_data)
						if ProfileService.ServiceLocked == false then
							local active_session = latest_data.MetaData.ActiveSession
							local force_load_session = latest_data.MetaData.ForceLoadSession
							-- IsThisSession(active_session)
							if active_session == nil then
								latest_data.MetaData.ActiveSession = {PlaceId, JobId}
								latest_data.MetaData.ForceLoadSession = nil
							elseif type(active_session) == "table" then
								if IsThisSession(active_session) == false then
									local last_update = latest_data.MetaData.LastUpdate
									if last_update ~= nil then
										if os.time() - last_update > SETTINGS.AssumeDeadSessionLock then
											latest_data.MetaData.ActiveSession = {PlaceId, JobId}
											latest_data.MetaData.ForceLoadSession = nil
											return
										end
									end
									if steal_session == true or aggressive_steal == true then
										local force_load_uninterrupted = false
										if force_load_session ~= nil then
											force_load_uninterrupted = IsThisSession(force_load_session)
										end
										if force_load_uninterrupted == true or aggressive_steal == true then
											latest_data.MetaData.ActiveSession = {PlaceId, JobId}
											latest_data.MetaData.ForceLoadSession = nil
										end
									elseif request_force_load == true then
										latest_data.MetaData.ForceLoadSession = {PlaceId, JobId}
									end
								else
									latest_data.MetaData.ForceLoadSession = nil
								end
							end
						end
					end,
					MissingProfileHandle = function(latest_data)
						latest_data.Data = DeepCopyTable(self._profile_template)
						latest_data.MetaData = {
							ProfileCreateTime = os.time(),
							SessionLoadCount = 0,
							ActiveSession = {PlaceId, JobId},
							ForceLoadSession = nil,
							MetaTags = {},

						}
					end,
					EditProfile = function(latest_data)
						if ProfileService.ServiceLocked == false then
							local active_session = latest_data.MetaData.ActiveSession
							if active_session ~= nil and IsThisSession(active_session) == true then
								latest_data.MetaData.SessionLoadCount = latest_data.MetaData.SessionLoadCount + 1
								latest_data.MetaData.LastUpdate = os.time()
							end
						end
					end,
				},
				is_user_mock
			)
			if profile_load_job[1] == load_id then -- Load job hasn't been yoinked
				loaded_data = profile_load_job[2]
				profile_load_jobs[profile_key] = nil
			else
				ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
				return nil -- Load job yoinked
			end
		end
		-- Handle load_data:
		if loaded_data ~= nil then
			local active_session = loaded_data.MetaData.ActiveSession
			if type(active_session) == "table" then
				if IsThisSession(active_session) == true then
					-- Special component in MetaTags:
					loaded_data.MetaData.MetaTagsLatest = DeepCopyTable(loaded_data.MetaData.MetaTags)
					-- Case #1: Profile is now taken by this session:
					-- Create Profile object:
					local global_updates_object = {
						_updates_latest = loaded_data.GlobalUpdates,
						_pending_update_lock = {},
						_pending_update_clear = {},

						_new_active_update_listeners = Madwork.NewScriptSignal(),
						_new_locked_update_listeners = Madwork.NewScriptSignal(),

						_profile = nil,
					}
					setmetatable(global_updates_object, GlobalUpdates)
					local profile = {
						Data = loaded_data.Data,
						MetaData = loaded_data.MetaData,
						MetaTagsUpdated = Madwork.NewScriptSignal(),
						GlobalUpdates = global_updates_object,

						_profile_store = self,
						_profile_key = profile_key,

						_release_listeners = Madwork.NewScriptSignal(),
						_hop_ready_listeners = Madwork.NewScriptSignal(),
						_hop_ready = false,

						_load_timestamp = os.clock(),

						_is_user_mock = is_user_mock,
					}
					setmetatable(profile, Profile)
					global_updates_object._profile = profile
					-- Referencing Profile object in ProfileStore:
					if next(self._loaded_profiles) == nil and next(self._mock_loaded_profiles) == nil then -- ProfileStore object was inactive
						table.insert(ActiveProfileStores, self)
					end
					if is_user_mock == true then
						self._mock_loaded_profiles[profile_key] = profile
					else
						self._loaded_profiles[profile_key] = profile
					end
					-- Adding profile to AutoSaveList;
					AddProfileToAutoSave(profile)
					-- Special case - finished loading profile, but session is shutting down:
					if ProfileService.ServiceLocked == true then
						SaveProfileAsync(profile, true) -- Release profile and yield until the DataStore call is finished
						profile = nil -- nil will be returned by this call
					end
					-- Return Profile object:
					ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
					return profile
				else
					-- Case #2: Profile is taken by some other session:
					if force_load == true then
						local force_load_session = loaded_data.MetaData.ForceLoadSession
						local force_load_uninterrupted = false
						if force_load_session ~= nil then
							force_load_uninterrupted = IsThisSession(force_load_session)
						end
						if force_load_uninterrupted == true then
							if request_force_load == false then
								force_load_steps = force_load_steps + 1
								if force_load_steps == SETTINGS.ForceLoadMaxSteps then
									steal_session = true
								end
							end
							Madwork.HeartbeatWait() -- Overload prevention
						else
							-- Another session tried to force load this profile:
							ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
							return nil
						end
						request_force_load = false -- Only request a force load once
					elseif aggressive_steal == true then
						Madwork.HeartbeatWait() -- Overload prevention
					else
						local handler_result = not_released_handler(active_session[1], active_session[2])
						if handler_result == "Repeat" then
							Madwork.HeartbeatWait() -- Overload prevention
						elseif handler_result == "Cancel" then
							ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
							return nil
						elseif handler_result == "ForceLoad" then
							force_load = true
							request_force_load = true
							Madwork.HeartbeatWait() -- Overload prevention
						elseif handler_result == "Steal" then
							aggressive_steal = true
							Madwork.HeartbeatWait() -- Overload prevention
						else
							error(
								"[ProfileService]: Invalid return from not_released_handler (\"" .. tostring(handler_result) .. "\")(" .. type(handler_result) .. ");" ..
									"\n" .. IdentifyProfile(self._profile_store_name, self._profile_store_scope, profile_key) ..
								" Traceback:\n" .. debug.traceback()
							)
						end
					end
				end
			else
				ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
				return nil -- In this scenario it is likely the ProfileService.ServiceLocked flag was raised
			end
		else
			Madwork.HeartbeatWait() -- Overload prevention
		end
	end
	ActiveProfileLoadJobs = ActiveProfileLoadJobs - 1
	return nil -- If loop breaks return nothing
end

function ProfileStore:GlobalUpdateProfileAsync(profile_key, update_handler, _use_mock) --> [GlobalUpdates / nil] (update_handler(GlobalUpdates))
	if type(profile_key) ~= "string" or string.len(profile_key) == 0 then
		error("[ProfileService]: Invalid profile_key")
	end
	if type(update_handler) ~= "function" then
		error("[ProfileService]: Invalid update_handler")
	end

	if ProfileService.ServiceLocked == true then
		return nil
	end

	WaitForPendingProfileStore(self)

	while ProfileService.ServiceLocked == false do
		-- Updating profile:
		local loaded_data = StandardProfileUpdateAsyncDataStore(
			self,
			profile_key,
			{
				ExistingProfileHandle = nil,
				MissingProfileHandle = nil,
				EditProfile = function(latest_data)
					-- Running update_handler:
					local global_updates_object = {
						_updates_latest = latest_data.GlobalUpdates,
						_update_handler_mode = true,
					}
					setmetatable(global_updates_object, GlobalUpdates)
					update_handler(global_updates_object)
				end,
			},
			_use_mock == UseMockTag
		)
		CustomWriteQueueMarkForCleanup(self._profile_store_lookup, profile_key)
		-- Handling loaded_data:
		if loaded_data ~= nil then
			-- Return GlobalUpdates object (Update successful):
			local global_updates_object = {
				_updates_latest = loaded_data.GlobalUpdates,
			}
			setmetatable(global_updates_object, GlobalUpdates)
			return global_updates_object
		else
			Madwork.HeartbeatWait() -- Overload prevention
		end
	end
	return nil -- Return nothing (Update unsuccessful)
end

function ProfileStore:ViewProfileAsync(profile_key, _use_mock) --> [Profile / nil]
	if type(profile_key) ~= "string" or string.len(profile_key) == 0 then
		error("[ProfileService]: Invalid profile_key")
	end

	if ProfileService.ServiceLocked == true then
		return nil
	end

	WaitForPendingProfileStore(self)

	while ProfileService.ServiceLocked == false do
		-- Load profile:
		local loaded_data = StandardProfileUpdateAsyncDataStore(
			self,
			profile_key,
			{
				ExistingProfileHandle = nil,
				MissingProfileHandle = nil,
				EditProfile = nil,
			},
			_use_mock == UseMockTag
		)
		CustomWriteQueueMarkForCleanup(self._profile_store_lookup, profile_key)
		-- Handle load_data:
		if loaded_data ~= nil then
			-- Create Profile object:
			local global_updates_object = {
				_updates_latest = loaded_data.GlobalUpdates,
				_profile = nil,
			}
			setmetatable(global_updates_object, GlobalUpdates)
			local profile = {
				Data = loaded_data.Data,
				MetaData = loaded_data.MetaData,
				MetaTagsUpdated = Madwork.NewScriptSignal(),
				GlobalUpdates = global_updates_object,

				_profile_store = self,
				_profile_key = profile_key,

				_view_mode = true,

				_load_timestamp = os.clock(),
			}
			setmetatable(profile, Profile)
			global_updates_object._profile = profile
			-- Returning Profile object:
			return profile
		else
			Madwork.HeartbeatWait() -- Overload prevention
		end
	end
	return nil -- If loop breaks return nothing
end

function ProfileStore:WipeProfileAsync(profile_key, _use_mock) --> is_wipe_successful [bool]
	if type(profile_key) ~= "string" or string.len(profile_key) == 0 then
		error("[ProfileService]: Invalid profile_key")
	end

	if ProfileService.ServiceLocked == true then
		return false
	end

	WaitForPendingProfileStore(self)

	local wipe_status = StandardProfileUpdateAsyncDataStore(
		self,
		profile_key,
		{
			WipeProfile = true
		},
		_use_mock == UseMockTag
	)

	CustomWriteQueueMarkForCleanup(self._profile_store_lookup, profile_key)

	return wipe_status
end
