You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "jackyfang (JIRA)" <ji...@apache.org> on 2016/02/25 11:35:18 UTC

[jira] [Updated] (THRIFT-3672) client blocked when remote call

     [ https://issues.apache.org/jira/browse/THRIFT-3672?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

jackyfang updated THRIFT-3672:
------------------------------
    Description: 
this is is the thrift file:

include 'shared.thrift'
include "pos.thrift"
include "notice.thrift"

namespace py syncs.sync
namespace java syncs.sync

const string SERVICENAMESPACE = 'sync'

typedef i32 int

struct Product{
    1: string code,
    2: string name,
    3: string categoryName,
    4: optional double price_sell,
    5: optional double price_buy
}

struct OrderItem{
    1: string productCode,
    2: double price,
    3: double multiply,
    4: double amount,
    5: double discount
}

struct Order{
    1: string id,
    2: list<OrderItem> items,
    3: double amount,
    4: double actualAmount,
}

struct StockCurrentBase{
    1: string productCode,
    2: int version,
}

struct StockCurrent{
    1: StockCurrentBase stockBase,
    2: optional double multiply,
    3: optional Product product
}

service SyncService{
    bool postProducts(1: shared.PosContext posContext, 2: list<Product> products),
    bool postOrders(1: shared.PosContext posContext, 2: list<Order> orders),
    list<Order> pullOrders(1: shared.PosContext posContext),
    list<StockCurrent> syncStocks(1: shared.PosContext posContext, 2: list<StockCurrentBase> clientStocks)
}


bug resolve:
when i change the block:
struct StockCurrent{
    1: StockCurrentBase stockBase,
    2: optional double multiply,
    3: optional Product product
}

to :
struct StockCurrent{
    1: StockCurrentBase stockBase,
    2: optional double multiply,
   
}

everything works ok!

  was:
this is is the thrift file:

include 'shared.thrift'
include "pos.thrift"
include "notice.thrift"

namespace py syncs.sync
namespace java syncs.sync

const string SERVICENAMESPACE = 'sync'

typedef i32 int

struct Product{
    1: string code,
    2: string name,
    3: string categoryName,
    4: optional double price_sell,
    5: optional double price_buy
}

struct OrderItem{
    1: string productCode,
    2: double price,
    3: double multiply,
    4: double amount,
    5: double discount
}

struct Order{
    1: string id,
    2: list<OrderItem> items,
    3: double amount,
    4: double actualAmount,
}

struct StockCurrentBase{
    1: string productCode,
    2: int version,
}

struct StockCurrent{
    1: StockCurrentBase stockBase,
    2: optional double multiply,
    3: optional Product product
}

service SyncService{
    bool postProducts(1: shared.PosContext posContext, 2: list<Product> products),
    bool postOrders(1: shared.PosContext posContext, 2: list<Order> orders),
    list<Order> pullOrders(1: shared.PosContext posContext),
    list<StockCurrent> syncStocks(1: shared.PosContext posContext, 2: list<StockCurrentBase> clientStocks)
}


> client blocked when remote call 
> --------------------------------
>
>                 Key: THRIFT-3672
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3672
>             Project: Thrift
>          Issue Type: Bug
>    Affects Versions: 0.9.3
>            Reporter: jackyfang
>
> this is is the thrift file:
> include 'shared.thrift'
> include "pos.thrift"
> include "notice.thrift"
> namespace py syncs.sync
> namespace java syncs.sync
> const string SERVICENAMESPACE = 'sync'
> typedef i32 int
> struct Product{
>     1: string code,
>     2: string name,
>     3: string categoryName,
>     4: optional double price_sell,
>     5: optional double price_buy
> }
> struct OrderItem{
>     1: string productCode,
>     2: double price,
>     3: double multiply,
>     4: double amount,
>     5: double discount
> }
> struct Order{
>     1: string id,
>     2: list<OrderItem> items,
>     3: double amount,
>     4: double actualAmount,
> }
> struct StockCurrentBase{
>     1: string productCode,
>     2: int version,
> }
> struct StockCurrent{
>     1: StockCurrentBase stockBase,
>     2: optional double multiply,
>     3: optional Product product
> }
> service SyncService{
>     bool postProducts(1: shared.PosContext posContext, 2: list<Product> products),
>     bool postOrders(1: shared.PosContext posContext, 2: list<Order> orders),
>     list<Order> pullOrders(1: shared.PosContext posContext),
>     list<StockCurrent> syncStocks(1: shared.PosContext posContext, 2: list<StockCurrentBase> clientStocks)
> }
> bug resolve:
> when i change the block:
> struct StockCurrent{
>     1: StockCurrentBase stockBase,
>     2: optional double multiply,
>     3: optional Product product
> }
> to :
> struct StockCurrent{
>     1: StockCurrentBase stockBase,
>     2: optional double multiply,
>    
> }
> everything works ok!



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