Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:73176 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 41473 invoked from network); 15 Mar 2014 06:28:58 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 15 Mar 2014 06:28:58 -0000 Authentication-Results: pb1.pair.com header.from=yohgaki@gmail.com; sender-id=pass Authentication-Results: pb1.pair.com smtp.mail=yohgaki@gmail.com; spf=pass; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 209.85.217.175 as permitted sender) X-PHP-List-Original-Sender: yohgaki@gmail.com X-Host-Fingerprint: 209.85.217.175 mail-lb0-f175.google.com Received: from [209.85.217.175] ([209.85.217.175:61580] helo=mail-lb0-f175.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id E1/70-36553-823F3235 for ; Sat, 15 Mar 2014 01:28:57 -0500 Received: by mail-lb0-f175.google.com with SMTP id w7so2341237lbi.20 for ; Fri, 14 Mar 2014 23:28:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-type; bh=NKPmLdRqcyBnaMYbwC4ELpaz2F65ZkcQH+w6Q9gJxB0=; b=JGfJUK4t8veIy4Qz6YQeNfg+vcWW8l5s0VM/gRlD05xJSjCV5BUPY5yzCKtG9R5gNW cKuGAhoq0MHjs9ADfmckmxtaYmFkVtdqlhR06Fit6NJ8AcbSyZTpAXiAfA/JZwe978Rz NgqxmuCVkK2XTeZsBtP0JmBP+zkkLOidGbrT9eQXK4CDHE/LeCpnKg08ZhZk4OU8jnoM 1Z27NeG4ccfTfs5F7GSSWk5LOi3BewnYD1aBqyl+/YEM5yDhcubfbiZUO6qzja9+fi/l 2f0eSX9apgrj+hBMAeCsiAy58QKcStoTnTiUzFMVWY9Qsi72G4UpC1p1m6q40gXa1vRC c7Kg== X-Received: by 10.112.35.130 with SMTP id h2mr8052126lbj.15.1394864933505; Fri, 14 Mar 2014 23:28:53 -0700 (PDT) MIME-Version: 1.0 Sender: yohgaki@gmail.com Received: by 10.112.205.73 with HTTP; Fri, 14 Mar 2014 23:28:13 -0700 (PDT) In-Reply-To: References: Date: Sat, 15 Mar 2014 15:28:13 +0900 X-Google-Sender-Auth: xC5aXSXsOiCA9OcsyuQ_V3b2foo Message-ID: To: Andrey Andreev Cc: Patrick Schaaf , internals , Pierre Joye Content-Type: multipart/alternative; boundary=001a11c3735adf114704f49f4c5e Subject: Re: [PHP-DEV] Re: Revert session_serializer_name(), session_gc() From: yohgaki@ohgaki.net (Yasuo Ohgaki) --001a11c3735adf114704f49f4c5e Content-Type: text/plain; charset=UTF-8 On Sat, Mar 15, 2014 at 2:10 PM, Andrey Andreev wrote: > On Sat, Mar 15, 2014 at 6:36 AM, Yasuo Ohgaki wrote: > > Hi all, > > > > On Sat, Mar 15, 2014 at 1:15 PM, Yasuo Ohgaki > wrote: > >>> > >>> > >>> Now back to the main topic: > >>> > >>> Please exclude session_serializer_name(), session_gc(), > >>> session_reset(), session_abort() and the "session write short-circuit" > >>> from the 5.6 branch. > >> > >> > >> I removed session_serializer_name() and session_gc() > >> (Although session_gc() is mandatory API, IMO) > >> I like the idea removing INI modifying function in the future release. > >> > >> I don't understand reason why you insist removal of session_reset() > >> and session_abort(). They are just missing API for session module, > >> like session_gc(). > >> > >> There should be API (i.e. function/method or parameters) for distinct > >> operations that user may use. > >> > >> I may agree if you could provide the reason why there should not be > >> these APIs. > > session_abort(), session_reset() are just two functions that somebody > asked about in 2002 via bugs.php.net and nobody responded (11 years > without a single comment) right up until you just assumed it's a good > idea and commited it. If it was "missing API", surely at least 1 user > per year would've requested it. ;) > > I understand that you see them as small, trivial additions, but being > a part of sessions automatically makes them very important and as > such, they should be evaluated collectively, not by a single person. > It does not explain why it is not needed. For example, session_abort() can be used to with error/exception during execution. You may not use, but I would use it to make sure $_SESSION would not contains any unneeded changes when error/exception occurred. > I thought it might be better to explain what new functions do. > > > > session_gc() executes GC without tweaking INIs. > > session_abort() aborts session without writing $_SESSION. There is no way > > achieve w/o it. > > session_reset() re-reads session and re-initializes $_SESSION. There is > no > > way achieve w/o it. (It could be done with session_abort(), though) > > "write short circuit" omits "write" when $_SESSION hasn't change. There > is > > no point calling write API and writing to storage for the same data. > > "write short circuit" as I understand it, is an exact copy of the > 'lazy_write' option. This will be addressed in the previously > mentioned RFC that I'll post later today. No. It's not. "lazy_write" does not lock session data while "write short circuit" does. In other words, "lazy_write" changes session behavior, but "write short circuit" does not. i.e. With locked session data, "write short circuit" would not change how session manager works. Regards, -- Yasuo Ohgaki yohgaki@ohgaki.net --001a11c3735adf114704f49f4c5e--