NAS - Refresh Object Cache

bbrownbbrown Member Posts: 3,268
Short of restarting, does anyone know a way to force NAS to refresh its Object Cache?
There are no bugs - only undocumented features.

Comments

  • ta5ta5 Member Posts: 1,164
    Hi
    You can try to set the object cache to zero. Anyhow, I would prefer to restart NAS after object modification.
    Regards
    Thomas
  • bbrownbbrown Member Posts: 3,268
    Yes, I do manually restart NAS whenever I import new or updated objects. What's happening here is jobs are randomly failing with the message "Another user has changed the definition of the XXX table.....", although no changes have been made.

    Setting cache to zero is interesting. I wonder if the system would jsut ignore that and set the cache to the 8KB default.
    There are no bugs - only undocumented features.
  • ta5ta5 Member Posts: 1,164
    0 vs 8 kb: Yes, would be an interesting experiment, altough the performance could be too bad. Why do you get the error "another user has..."? I think, but not sure, if a developer uses "edit" on a table in object designer and leaves the object without saving could be enough...
  • ara3nara3n Member Posts: 9,256
    You need to stop NAS before loading objects and then start it after loading the objects.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • bbrownbbrown Member Posts: 3,268
    ara3n wrote:
    You need to stop NAS before loading objects and then start it after loading the objects.

    Yes, that is my practice, when I'm loading objects. But no objects are being loaded here.
    There are no bugs - only undocumented features.
  • bbrownbbrown Member Posts: 3,268
    ta5 wrote:
    0 vs 8 kb: Yes, would be an interesting experiment, altough the performance could be too bad. Why do you get the error "another user has..."? I think, but not sure, if a developer uses "edit" on a table in object designer and leaves the object without saving could be enough...


    I beleive that is the issue here. Someone may open an object (table) to just look at it. Then close it with no changes. I've been able to duplicate this behavior.
    There are no bugs - only undocumented features.
  • ara3nara3n Member Posts: 9,256
    somebody is designing the table changes something but not saving it. It happens to me on my own session. If i have the table sales order running and I design the sales line table change something but don't save and close it, the sales order Form errors out with the following error.
    Another user has changed the definition of the Sales Line table after the activity was started.

    Start your activity again.
    Ahmed Rashed Amini
    Independent Consultant/Developer


    blog: https://dynamicsuser.net/nav/b/ara3n
  • ta5ta5 Member Posts: 1,164
    This is a bug...
    Anyhow, the only way is to stop developers to fumble in a production db :P
  • bbrownbbrown Member Posts: 3,268
    ta5 wrote:
    This is a bug...
    Anyhow, the only way is to stop developers to fumble in a production db :P

    They're no fumbling. They likely have very valid reasons for being in there. One situation might be they are trying to debug a user problem. So they need to open the objects to set breakpoints.

    The odd part is this NAS (Job Queue) has been running for almost 5 years and we've never seen this problem until this week when we added a new job.
    There are no bugs - only undocumented features.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    NAV behaves like this for ages. I always wonder how NAV indicates if an objects has changed or not. I thought there's some kind of version indicator for each object. Maybe like forms based on date and time (incl. milliseconds) stored in the zup file?! But from what I've seen so far there must be something else.

    Btw, in RTC it's pretty much the same regarding the meta data table. Sometimes it says meta data of a certain object has changed although no one even touched it.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • ta5ta5 Member Posts: 1,164
    ta5 wrote:
    This is a bug...
    Anyhow, the only way is to stop developers to fumble in a production db :P


    Just been kidding...
  • bbrownbbrown Member Posts: 3,268
    NAV behaves like this for ages. I always wonder how NAV indicates if an objects has changed or not. I thought there's some kind of version indicator for each object. Maybe like forms based on date and time (incl. milliseconds) stored in the zup file?! But from what I've seen so far there must be something else.

    Btw, in RTC it's pretty much the same regarding the meta data table. Sometimes it says meta data of a certain object has changed although no one even touched it.

    That I'm aware of. Been around NAV since 1999. My problem is I'm trying to find a workable solution for this situation. Sort of talking it thru "out loud" here. Hoping that maybe someone has an idea that sends me off in the right direction to a resolution.

    BTW - It's not occurring every time. We added the new job on Monday. It's run successfully 3 out of the 5 days. And the failures are not back-to-back. I'm not sure I'm chasing the right problem.
    There are no bugs - only undocumented features.
  • bbrownbbrown Member Posts: 3,268
    A little more information:

    From the error message, you'd think the solution would be to restart the NAS. But it has not been restarted since the new objects were imported this past weekend. Just the job was reset when it failed. And it then ran correctly 3 times but failed on the fourth.
    There are no bugs - only undocumented features.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    bbrown wrote:
    What's happening here is jobs are randomly failing with the message "Another user has changed the definition of the XXX table.....", although no changes have been made.
    I think this is the real problem. Refreshing the object cache is just the workaround. To be honest I've also seen this error message in NAS although I could guarantee that no changes have been made and even no one just opened any table in design mode. To me it looks like NAS sometimes "changes" objects himself. That means it doesn't really change the objects but it changes something that is used to indicate if an object has changed.

    Have you tried SELECTLATESTVERSION?
    "Money is likewise the greatest chance and the greatest scourge of mankind."
  • bbrownbbrown Member Posts: 3,268
    I'd thought about that, but doesn't SELECTLATESTVERSION had to do with data versioning in the database.
    There are no bugs - only undocumented features.
  • einsTeIn.NETeinsTeIn.NET Member Posts: 1,050
    Yeah, I think it's only related to data. But... Object Table contains also data and if the indicator (for object changes) is based on such a table it maybe helps.
    "Money is likewise the greatest chance and the greatest scourge of mankind."
Sign In or Register to comment.