Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0008361opensim[REGION] OpenSim Corepublic2018-08-30 02:292018-08-30 13:05
ReporterMandarinka Tasty 
Assigned To 
PrioritynormalSeveritytweakReproducibilityalways
Statuspatch feedbackResolutionopen 
PlatformOSOS Version
Product Version0.9.0.1 
Target VersionFixed in Version 
Summary0008361: Addition of missing config boolean SkipDelayOnEmptyRegion accordingly to code's documentation.
DescriptionI've added a config boolean SkipDelayOnEmptyRegion, because it is missing in ini files, and it has been included in the code before.

If SkipDelayOnEmptyRegion = true, then if number of avatars in the region is equal to zero, time of region's restart is reduced. NPC characters are not counted. Default setting of that bool is false.
TagsNo tags attached.
Git Revision or version number
Run ModeStandalone (1 Region) , Standalone (Multiple Regions) , Grid (1 Region per Sim) , Grid (Multiple Regions per Sim)
Physics EngineBasicPhysics, ODE, BulletSim, ubODE
EnvironmentMono / Linux32, Mono / Linux64, Mono / Windows, Mono / OSX, .NET / Windows32, .NET / Windows64
Mono Version5.x
Viewer
Attached Filespatch file icon 0001-Addition-of-missing-config-boolean-SkipDelayOnEmptyR.patch [^] (6,044 bytes) 2018-08-30 11:52 [Show Content]

- Relationships

-  Notes
(0032907)
UbitUmarov (administrator)
2018-08-30 06:59

i don't see that doing anything ??
also restarts may still be terrible
(0032909)
Mandarinka Tasty (reporter)
2018-08-30 07:12

Hello ) Well, I have only added config line. But someone other has prepared it earlier in the code. Not you ? Maybe other developer. Never mind.

 That is what it does:

private void OnTimer(object source, ElapsedEventArgs e)
{
        int nextInterval = DoOneNotice(true);
        if (m_shortCircuitDelays)
        {
            if (CountAgents() == 0)
            {
                m_Scene.RestartNow();
                return;
            }
         }

        SetTimer(nextInterval);
}

where:

int CountAgents()
        {
            //m_log.Info("[RESTART MODULE]: Counting affected avatars");
            int agents = 0;

            if (m_rebootAll)
            {
                foreach (Scene s in SceneManager.Instance.Scenes)
                {
                    foreach (ScenePresence sp in s.GetScenePresences())
                    {
                        if (!sp.IsChildAgent && !sp.IsNPC)
                            agents++;
                    }
                }
            }
            else
            {
                foreach (ScenePresence sp in m_Scene.GetScenePresences())
                {
                    if (!sp.IsChildAgent && !sp.IsNPC)
                        agents++;
                }
            }

            m_log.InfoFormat("[RESTART MODULE]: Number of avatars in region: {0}.", agents);

            return agents;
        }

I personally use restarts with InworldRestartShutsDown = true,so
I don't worry about classical restarts.
(0032910)
Mandarinka Tasty (reporter)
2018-08-30 11:56
edited on: 2018-08-30 11:57

Hello @ Ubit again.
After deeper analyse I confirm that this code that should have properly worked with my config line, does not work correctly. Well i was relying that if code had been included then it could work )
Hence I have modified it little bit. And now it should work.
I have additionally added some messages to make them correspond with what i have done with osRegionRestart long time ago.

(0032911)
UbitUmarov (administrator)
2018-08-30 12:21

well region restarts still scare me a lot, they will most like fail on current version :(

btw please avoid new c# 7.0 on code. many still use older versions of VS and also mono 5x may not be up to date on all

this is about your other patch Mandarinka

…blabla(bleble, our UUID id)
this fails to compile.

and other fancy constructs
i already changed to older form
(0032912)
Mandarinka Tasty (reporter)
2018-08-30 13:05

@ Ubit . If it comes to using forms like:
TryGetScenePresence(UUID agentID, out ScenePresence sp) etc. I can come back to previous forms, no problem. I'll be writing in older way. Thanks for paying my attention on it.

And if it comes to concept of restarts, then if it is impossible to make it correct in actual form of OpenSim technology, then maybe let's consider some simplified forms of so called monits built-in core code. Or other, various methods that allow for complete shutdown of simulator and run it again in automatical way after short time. Maybe it'll be easier to implement it in shorter time?

- Issue History
Date Modified Username Field Change
2018-08-30 02:29 Mandarinka Tasty New Issue
2018-08-30 02:29 Mandarinka Tasty File Added: 0001-Addition-of-missing-config-boolean-SkipDelayOnEmptyR.patch
2018-08-30 02:29 Mandarinka Tasty Status new => patch included
2018-08-30 06:59 UbitUmarov Note Added: 0032907
2018-08-30 07:12 Mandarinka Tasty Note Added: 0032909
2018-08-30 11:52 Mandarinka Tasty File Deleted: 0001-Addition-of-missing-config-boolean-SkipDelayOnEmptyR.patch
2018-08-30 11:52 Mandarinka Tasty File Added: 0001-Addition-of-missing-config-boolean-SkipDelayOnEmptyR.patch
2018-08-30 11:56 Mandarinka Tasty Note Added: 0032910
2018-08-30 11:56 Mandarinka Tasty Status patch included => patch feedback
2018-08-30 11:57 Mandarinka Tasty Note Edited: 0032910 View Revisions
2018-08-30 12:21 UbitUmarov Note Added: 0032911
2018-08-30 13:05 Mandarinka Tasty Note Added: 0032912


Copyright © 2000 - 2012 MantisBT Group
Powered by Mantis Bugtracker