File tree Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Expand file tree Collapse file tree 3 files changed +19
-1
lines changed Original file line number Diff line number Diff line change @@ -172,6 +172,10 @@ It's ok you can do whatever you need. I add log options for some technical infor
172
172
173
173
##Changelog
174
174
175
+ ###0 .4.1
176
+
177
+ Add clear schema cache on change schema id
178
+
175
179
###0 .4.0
176
180
177
181
Change msgpack5 to msgpack-lite(thx to @arusakov ).
Original file line number Diff line number Diff line change @@ -56,6 +56,7 @@ function TarantoolConnection (options){
56
56
readable : true ,
57
57
writable : true
58
58
} ) ;
59
+ this . schemaId = null ;
59
60
this . msgpack = options . msgpack || msgpack ;
60
61
this . state = states . INITED ;
61
62
this . options = _ . extend ( { } , defaultOptions , options ) ;
@@ -243,6 +244,19 @@ TarantoolConnection.prototype._processResponse = function(buffer){
243
244
var obj = this . msgpack . decode ( dataBuffer ) ;
244
245
245
246
var reqId = obj [ 0 ] [ 1 ] ;
247
+ if ( this . schemaId )
248
+ {
249
+ if ( this . schemaId != obj [ 0 ] [ 5 ] )
250
+ {
251
+ this . schemaId = obj [ 0 ] [ 5 ] ;
252
+ //clear cache for naming
253
+ this . namespace = { } ;
254
+ }
255
+ }
256
+ else
257
+ {
258
+ this . schemaId = obj [ 0 ] [ 5 ] ;
259
+ }
246
260
for ( var i = 0 ; i < this . commandsQueue . length ; i ++ )
247
261
if ( this . commandsQueue [ i ] [ 1 ] == reqId )
248
262
{
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " tarantool-driver" ,
3
- "version" : " 0.4.0 " ,
3
+ "version" : " 0.4.1 " ,
4
4
"description" : " Tarantool driver for 1.6" ,
5
5
"main" : " index.js" ,
6
6
"scripts" : {
You can’t perform that action at this time.
0 commit comments