[ 
https://issues.apache.org/jira/browse/S2GRAPH-12?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15484341#comment-15484341
 ] 

ASF GitHub Bot commented on S2GRAPH-12:
---------------------------------------

Github user SteamShon commented on a diff in the pull request:

    https://github.com/apache/incubator-s2graph/pull/79#discussion_r78388184
  
    --- Diff: s2core/src/main/scala/org/apache/s2graph/core/Management.scala ---
    @@ -270,22 +270,35 @@ object Management extends JSONParser {
         props
       }
     
    -
       /**
        * update label name.
        */
       def updateLabelName(oldLabelName: String, newLabelName: String) = {
    -    for {
    -      old <- Label.findByName(oldLabelName)
    -    } {
    -      Label.findByName(newLabelName) match {
    -        case None =>
    -          Label.updateName(oldLabelName, newLabelName)
    -        case Some(_) =>
    -        //          throw new RuntimeException(s"$newLabelName already 
exist")
    +    Model withTx { implicit session =>
    --- End diff --
    
    👍 for using Transaction.


> Add Label Name Swap Feature
> ---------------------------
>
>                 Key: S2GRAPH-12
>                 URL: https://issues.apache.org/jira/browse/S2GRAPH-12
>             Project: S2Graph
>          Issue Type: New Feature
>            Reporter: Hyunsung Jo
>              Labels: feature
>
> Operating live services on S2Graph, there are a few cases where interchanging 
> two label names could come in handy.
> For example, assume that a social graph is being served under the label name 
> _A_, and an updated graph has been loaded to _A'_.
> It would be nice if one can refer to the updated data of _A'_ while still 
> making requests to the same label name _A_ so that no client-side code change 
> is required.
> Obviously, this feature should have transaction support.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to