In my opinion existing events EVT_CACHE_QUERY_EXECUTION_STARTED should be deprecated and added two new for start and for end of queries which should cover all SQL query types. I have some doubts about provide text of a query even with hidden arguments, probably it should be configured due to it could lead to security leak
пн, 20 июл. 2020 г. в 12:49, Stanislav Lukyanov <stanlukya...@gmail.com>: > Maksim, > > Can we change the EVT_CACHE_QUERY_EXECUTED to fire earlier? Or should > there be an EVT_CACHE_QUERY_EXECUTION_STARTED for the query start, while > the old event would continue to work for query finish? > I think the new event needs to either reuse the old one, or be its mirror > for the query start. It also means that we probably should resolve the > issues you've listed. > > Would the event notification be synchronous? In which thread? Asynchronous > is generally preferred - would it work? > > What happens in case the event listener fails? > > Thanks, > Stan > > > On 16 Jul 2020, at 18:49, Denis Magda <dma...@apache.org> wrote: > > > > Taras, Yury, Ivan, > > > > Could you please join this thread and share your thoughts? Do we already > > have any plans on tracking of the DDL and DML queries? > > > > - > > Denis > > > > > > On Wed, Jul 15, 2020 at 12:09 AM Max Timonin <timonin.ma...@gmail.com> > > wrote: > > > >> Hi Denis, thanks for the answer! > >> > >> We already checked EVT_CACHE_QUERY_EXECUTED and found that it works > only in > >> cases: > >> 1. Scan queries and Select queries (common pattern is access to cache > >> data); > >> 2. This event triggers only if query execution succeeds, in case of > failure > >> while execution this event won't fire. > >> > >> Our additional requirements are to protocol queries: > >> 1. that aren't cache related (for example, alter user); > >> 2. that relate to multiple caches (while EVT_CACHE_QUERY_EXECUTED have > >> field cacheName related to specific cache); > >> 3. we need to protocol also DDL and DML queries. > >> > >> Regards, > >> Maksim > >> > >> On Tue, Jul 14, 2020 at 10:20 PM Denis Magda <dma...@apache.org> wrote: > >> > >>> Hi Max, > >>> > >>> Could you check if the EVT_CACHE_QUERY_EXECUTED event is what you're > >>> looking for? > >>> > >>> > >> > https://www.gridgain.com/docs/latest/developers-guide/events/events#cache-query-events > >>> > >>> - > >>> Denis > >>> > >>> > >>> On Fri, Jul 10, 2020 at 3:54 AM Max Timonin <timonin.ma...@gmail.com> > >>> wrote: > >>> > >>>> Hi Igniters! > >>>> > >>>> We're going to protocol all input SQL queries from our users. > Currently > >>>> there is no such mechanism in Ignite to use for it. So we're proposing > >> to > >>>> add a new event: QUERY_EXECUITION_EVENT. > >>>> > >>>> Requirements for the event: > >>>> 1. If this event fires it means that a query is correct and will be > >>>> executed (and failed only in exceptional cases); > >>>> > >>>> 2. Event fires for all query types; > >>>> > >>>> 3. Required fields are: > >>>> - text of a query (with hidden arguments); > >>>> - arguments of query; > >>>> - query type; > >>>> - node id. > >>>> > >>>> Looks that this event should go along with `runningQryMgr::register` > in > >>>> class `IgniteH2Indexing` as this method invoked for all input queries > >>> too. > >>>> > >>>> What do you think? > >>>> > >>>> Regards, > >>>> Maksim > >>>> > >>> > >> > > -- Живи с улыбкой! :D