Some bugfixes |
Post Reply ![]() |
Page 12> |
Author | |||
GM Stormcrow ![]() Moderator Group ![]() ![]() GM Joined: 23 Feb 2010 Location: Illyria Status: Offline Points: 3926 |
![]() ![]() ![]() ![]() ![]() Posted: 15 Sep 2021 at 14:15 |
||
Hi everyone,
A couple of bugfixes have just gone live. 1. Trade Hubs page error Some players were experiencing an error when looking at the trade hubs page. This should now be resolved. 2. Cotter harvesting orders (Skyfallen Stones) When you sent units to harvest skyfallen stones, your cotters would ignore the wonderful skyfallen stones in favour of herbs, minerals and the like. The order in which cotters will now preferentially gather resources (if there are multiple resource types on a square) is as follows:
This is a longstanding bug which is now hopefully resolved. Regards, SC
|
|||
![]() |
|||
Tensmoor ![]() Postmaster General ![]() ![]() Joined: 07 Apr 2015 Location: Scotland Status: Offline Points: 1830 |
![]() ![]() ![]() ![]() ![]() |
||
While your in a bug fixing mood.... As you know i've left Illy but I'm still monitoring the status of my
towns through my browser extension and I'm noticing some strange data in
the messages.
An example is msg id 189265806. It states that the marketplace in Rhynd
was hit 3 times but the levels went from 14 -> 13, 13 -> 12 and
then again from 13 -> 12. My first thought was that I had a bug in
the extension but on checking the raw data from the server it supports
the strange results. A second one is msg id 189263524. The 11th entry in the list has the Attacked column as
Miss but the Hit and miss columns show it as a hit and the level
changing from 16 to 15.
Not an issue of earth shattering significance but I felt I should let
you all know about it. I'll continue monitoring the results and update
the ticket with any more discrepancies I spot.
|
|||
![]() |
|||
Lagavulin ![]() Wordsmith ![]() ![]() Joined: 31 Dec 2012 Location: United States Status: Offline Points: 208 |
![]() ![]() ![]() ![]() ![]() |
||
Thank you for this fix Stormcrow. It is very welcome.
|
|||
![]() |
|||
Tensmoor ![]() Postmaster General ![]() ![]() Joined: 07 Apr 2015 Location: Scotland Status: Offline Points: 1830 |
![]() ![]() ![]() ![]() ![]() |
||
Had a bit of an Illy dream last night and I think my subconscious may have given me at least a partial answer to this. The towns I've seen affected by this were also being 'visited' by various diplo units which coupled with siege engine hits on basic res production buildings could have resulted in other buildings leveling down due to shortages. Don't know if that is the answer or not and to be honest I would have expected a separate notification of that sort of event but it could explain it. Have to say it was a bit wierd seeing a little pixelated figure speaking to me in a dream to say there was a localised shortage of something and that they had had to cut back on the workforce somewhere as a result...
|
|||
![]() |
|||
Tensmoor ![]() Postmaster General ![]() ![]() Joined: 07 Apr 2015 Location: Scotland Status: Offline Points: 1830 |
![]() ![]() ![]() ![]() ![]() |
||
Well it looks like my 'dream' was just that - a dream... You do get both a notification and a IGM when a building de-levels due to resource shortages. Below is the text from an IGM received by Tensmoor during the siege of Shadow of The Fires:
Notice however that it says the Military Academy was reduced from L2 twice and it also seems to have skipped going from L4 to L3. As far as I'm aware there was only one of those in the town (I think you can only have one in a town but I might be wrong) but without access to the account to check I can't be sure. It's worth noting as well that RSkilla had a very large number of siege engines attacking the town (20 hits each time by this stage) which meant that he was doing large amounts of damage each hour and this meant he had severely reduced not only the storage capacity but also res generation which caused the shortfall. Had there been theft missions run against it as well then probably more of these messages would have been triggered! Hope this is of some use to folks ![]() Tens
|
|||
![]() |
|||
Rill ![]() Postmaster General ![]() ![]() Player Council - Geographer Joined: 17 Jun 2011 Location: California Status: Offline Points: 7078 |
![]() ![]() ![]() ![]() ![]() |
||
The same building de-leveling twice for the same level is quite common in siege situations. I haven't seen it happen on sovereignty buildings before (my sov tended to be food sov, so didn't require resource upkeep except RP and gold; I had unlimited RP and some pretty hefty stashes of gold). I wonder if it might be the same sort of thing though, where the system doesn't "know" that a building has already de-levled in time for it to process the next de-leveling.
Edited by Rill - 02 Oct 2021 at 05:47 |
|||
![]() |
|||
GM Stormcrow ![]() Moderator Group ![]() ![]() GM Joined: 23 Feb 2010 Location: Illyria Status: Offline Points: 3926 |
![]() ![]() ![]() ![]() ![]() |
||
tyvm Tens & Rill. The only thing they have in common is that both de-levelling systems rely on a WHILE code loop, to process the de-levelling iteratively. We don't like WHILE loops in general, they have built-in problems, but they're a shortcut to using a full on event queueing system. I believe these are the only two WHILE loops in the codebase. I suspect now that the culprit is the loop itself, where - if the whole server is under some DB pressure at runtime - the actual underlying data de-level doesn't get committed by SQL before the next iteration runs. hence the dupes. If this is the case, this is potentially relatively easily fixed in a couple of different ways: a) One way would be simply to instruct the WHILE loop to WAIT for a millisecond or two for the DB commit to the update before resuming. This would be slower (by a few milliseconds per loop), but would have the advantage of making sure that separate processes operating at precisely the same time - ie two or more sieges hitting at the same time within milliseconds of each other (which would be a very rare occurrence) b) The more accurate way would be to pull all the data about the "thing-to-be-de-levelled" into a local table variable in the Stored Procedure, regardless of whose operations were de-levelling it (ie multiple simultaneous sieges), then run all the operations locally at runtime in the SP, and then perform the de-levelling. a) would be faster to implement and would be absolutely fine in 99.999% of circumstances, albeit locking a Stored Proc (and therefore a CPU thread) for a few more milliseconds than necessary b) would be a better fix, but would require quite a major rework of the "event processor" to recognise simultaneous de-levelling events initiated by multiple players occurring at *precisely* the same time, and process them together I'll have a poke around in the code and see what's what; we also have historic data, so I can check and see whether two or more sieges have ever hit the same town at the same millisecond. If not, Option a) would work fine. Thanks v much for making the connection between siege de-levelling and sov de-levelling - this has really helped me narrow down what's happening in the code! Best, SC
Edited by GM Stormcrow - 02 Oct 2021 at 08:31 |
|||
![]() |
|||
Tensmoor ![]() Postmaster General ![]() ![]() Joined: 07 Apr 2015 Location: Scotland Status: Offline Points: 1830 |
![]() ![]() ![]() ![]() ![]() |
||
@Rill - that was pretty much what i was starting to think ![]() @SC - you know I like to make sure you get kept busy ![]() I've not really given this the attention it deserves and as anyone who has looked at any of my code knows i'm expert at producing the most ineficient stuff imaginable so I'll refrain from commenting on the best way of looping ![]() I don't think this is really an important issue in itself but it was just one of those things that sort of got lodged in my braincell and refused to go when I asked it. Since I started to look at ideas for pathfinding it has become more and more apparent to me just how vital every milisecond can be when there are large numbers of calculations involved. When you then start scaling things up for multiple players doing multiple sieges on multiple targets all expecting an instant response it seems to be magnified by several orders. My respect for the entire team has grown massively! Returning to the original reason for this thread, it seems that there are still some (intermittent?) problems with the order that cotters are harvesting when there are multiple items to choose from on a tile. Since leaving I've made a couple of 'temp' accounts so i could check some of my data and both times I've seen folks mentioning it in GC. I've urged them to put in tickets and post in here each time but don't know if they have. Tens aka Apprentice Bookbinder
|
|||
![]() |
|||
GM Stormcrow ![]() Moderator Group ![]() ![]() GM Joined: 23 Feb 2010 Location: Illyria Status: Offline Points: 3926 |
![]() ![]() ![]() ![]() ![]() |
||
heh, no worries - I completely understand! I'll work something out, perhaps A/B testing two versions for a period of time to see what works best.
Thank you! You are *absolutely* right that every millisecond counts. I mean, if I can shave 0.5 of a millisecond off the runtime of the 'View World Map' Stored Proc... that frees up about 3 entire processor threads at peak demand, which is significant! Whilst our DB boxes are beasts, they're processing on average around 32,000 lines of code a second and countless writes... let alone 100s of thousands of database row reads per second - so much so that we actually keep the "most read" tables like the world map in RAM rather than on the SSDs, because going through the hardware RAID to the SSDs would be too slow for data reads!
No-one has opened a petition on this issue since the fix... Could I urge people still experiencing this issue to do so, with as much detail as possible, and I'll have a look. Best wishes, SC
|
|||
![]() |
|||
Rill ![]() Postmaster General ![]() ![]() Player Council - Geographer Joined: 17 Jun 2011 Location: California Status: Offline Points: 7078 |
![]() ![]() ![]() ![]() ![]() |
||
SC, I am not any kind of programmer at all. (I don't even attempt to get the clock time right on my microwave), but it seems to me that if a siege camp has multiple siege engines, all of them would by definition hit in the same millisecond and unless there is a rule that they can't hit the same building (which would not work if there were more siege engines than buildings, and even then there would need to be some kind of local table? wait, is this the hidden reason there is a limit to the number of siege engines that will fire in any given camp?), where was I? Oh, by definition you will nearly always have siege engines firing in the same millisecond.
Even if multiple siege engines in the same camp don't have this effect, unless the Illy warmongers are falling down on the job, it's pretty common to time sieges to arrange as nearly simultaneously as possible at a given city. When clearing a city of resources to encourage sov and building deleveling, it's also common to time the arrival of armies in order to have the greatest effect. Having as many buildings (sov and city) as possible deleveling at the same time is kind of the point. I'll be interested to hear which option you decide will work.
Edited by Rill - 03 Oct 2021 at 00:33 |
|||
![]() |
Post Reply ![]() |
Page 12> |
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |