spaghettidba / WorkloadTools

A collection of tools to collect, analyze and replay SQL Server workloads, on premises and in the cloud
MIT License
230 stars 51 forks source link

FileWorkloadListener #125

Closed JakubKad closed 1 year ago

JakubKad commented 1 year ago

Hello,

I have a problem with this Listener. Log says that it captured x events but the SQLite file will half that amount when I want to do replay. If I do replay, I get tons of errors regarding Inserts/Updated/Deletes. I think the file might be a problem. Listener is connected to AoAG cluster with routs selects and ReadOnly secundary replica, there might be a problem with this. We have used DatabaseFilter property too. Images included. Snímek obrazovky 2022-11-29 114550 image

spaghettidba commented 1 year ago

Hey! Thanks for reporting this. Replay will not work against a readonly replica, of course, so I guess you have your answer there. Regarding the count of events, not all recorded events can be replayed. WorkloadTools captures both started and completed events, but saves only started events. This could explain why you get double the count in the messages. I should check and maybe makes this more explicit

JakubKad commented 1 year ago

Well, I might expressed myself badly. We captured the Workload from AoAG cluster and replayed it on local DB, for sake of performance testing. So, I am not sure if the tool captures the whole work on this kind of server.

spaghettidba commented 1 year ago

I see. No, I'm not aware of any problem with capturing on an AG replica. All modifications to the local database should start from an identical copy of the source database. We had some slight synchronization issues between sessions that should be fixed in the latest version, even if not currently released. If you build from source (or I release a new version) you might get better results.

JakubKad commented 1 year ago

Okay, thanks for your time.