firebird icon indicating copy to clipboard operation
firebird copied to clipboard

Trace failed attaches #7580

Open Noremos opened this issue 2 years ago • 7 comments

I created a JRD-free ServerTraceManager to use it at Remote. It enables catching failed attachments. The new class is set as a parent class to TraceManager to reduce code duplication. I decided not to use virtual methods to maintain performance

Noremos avatar Jun 05 '23 09:06 Noremos

Also, new folder src/utilities/strace adds confusion with already existing src/utilities/ntrace. I suggest to use more distinct name, such as src/utilities/TraceManager

hvlad avatar Jun 06 '23 12:06 hvlad

Also, new folder src/utilities/strace adds confusion with already existing src/utilities/ntrace. I suggest to use more distinct name, such as src/utilities/TraceManager

To be precise - TraceManager is not utility. Placing it into utilities folder is rather confusing. BTW, keeping in jrd is also bad idea - that's not part of DB engine any more, that's common code for engine and netserver. I think we should add new folder for it. Things like auth & replication (also have common parts for engine/netserver) should also go into it.

I.e.

src.......
         common
         jrd
         newfolder.......
                      auth
                      replication
                      trace
         remote

Sorry, no idea how to call it.

AlexPeshkoff avatar Jun 06 '23 13:06 AlexPeshkoff

Also, new folder src/utilities/strace adds confusion with already existing src/utilities/ntrace. I suggest to use more distinct name, such as src/utilities/TraceManager

To be precise - TraceManager is not utility. Placing it into utilities folder is rather confusing.

It was my first thought too

BTW, keeping in jrd is also bad idea - that's not part of DB engine any more, that's common code for engine and netserver. I think we should add new folder for it. Things like auth & replication (also have common parts for engine/netserver) should also go into it.

Agree.

I.e.

src.......
         common
         jrd
         newfolder.......
                      auth
                      replication
                      trace

Please, TraceManager (or likewise) - to not confuse with other trace-related code.

     remote

Sorry, no idea how to call it.

I can live with 'utilities'. But if you consider there should be something different... I can offer: aux, assist, supplement, support, helper

hvlad avatar Jun 06 '23 14:06 hvlad

I can live with 'utilities'. But if you consider there should be something different... I can offer: aux, assist, supplement, support, helper

So far such "helper" things end up in common/classes folder.

aafemt avatar Jun 06 '23 14:06 aafemt

To be precise - TraceManager is not utility. Placing it into utilities folder is rather confusing. BTW, keeping in jrd is also bad idea - that's not part of DB engine any more, that's common code for engine and netserver. I think we should add new folder for it. Things like auth & replication (also have common parts for engine/netserver) should also go into it.

I've moved TraceManager and JrdTraceManager to a new folder called "supplement". I believe the remaining files should be relocated outside the scope of this PR.

Noremos avatar Jun 07 '23 07:06 Noremos

The moving of TraceManager core out of Jrd requires much more refactoring that it is done in this patch. I don't like to accept it in current state, sorry. I can finish it by myself, if needed, but I can't (and don't want to) commit into external (Red Soft) repository. Perhaps, this patch could be commited into separate branch at Firebird repository to continue to improve it there.

hvlad avatar Jun 21 '23 10:06 hvlad

Moved the patch into the Firebird repo: https://github.com/FirebirdSQL/firebird/tree/trace-failed-attach. @hvlad , the ball is in your court now.

dyemanov avatar Mar 04 '24 18:03 dyemanov