05.05.2017 18:59, Adriano dos Santos Fernandes write:
> Vlad and others,
> 
> Can you look at this?
> 
> https://github.com/asfernandes/firebird/tree/work/sharing-snapshot

   I took a quick look, so don't get me too serious. Also, my opinion could be
incomplete and be changed later :)

> It uses the simplest possible (and bad) IPC mechanism to manually test
> the idea of get the snapshot from others processes.

   Yes, IPC\locking is a weak point (so far)

> It uses syntax: SET TRANSACTION SHARING SNAPSHOT FROM <base transaction
> number>

   It doesn't forces (nor expresses) new transaction isolation level to be 
SNAPSHOT.
Probably, it would be more natural to extend "snap_shot" rule in parser:

iso_mode
        : snap_shot
        | READ UNCOMMITTED version_mode
        | READ COMMITTED version_mode
        ;

%type <uintVal> snap_shot
snap_shot
        : SNAPSHOT
        | SNAPSHOT TABLE
        | SNAPSHOT TABLE STABILITY
+       | SNAPSHOT SHARING FROM <N>

   Also, transaction_options() should verify\enforce isc_tpb_concurrency 
isolation
level for a new transaction.

> It is working in my tests.
> 
> Not talking about the IPC mechanism, is there any other trick needed?

   Ok, lets leave IPC\locking in peace for a while ;)

   I don't understand for what purpose tra_oldest_snapshot was added.
Also it is not clear why "base_number" variable is introduced in 
transaction_start()
and why it replaces "number" in many places.

   As for the tricks - so far i see no needs in something additional.
If we will decide to implement Sean's syntax with explicit "export" of 
transaction
snapshot, it could require some, though.

   Of course, IPC\locking should be reworked, but we agreed to not discuss it
at this stage.

Hope it helps,
Vlad

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to