Skip to content

Commit 3bfc841

Browse files
authored
Merge pull request #551 from v3io/development
dev -> master
2 parents 7176632 + 1734a6d commit 3bfc841

File tree

10 files changed

+784
-637
lines changed

10 files changed

+784
-637
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1037,3 +1037,4 @@ docker run \
10371037
[Apache 2](LICENSE)
10381038

10391039

1040+

backends/tsdb/writer.go

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ package tsdb
2323
import (
2424
"fmt"
2525
"sort"
26+
"strings"
2627
"time"
2728

2829
"github.com/nuclio/logger"
@@ -192,8 +193,12 @@ func (a *tsdbAppender) Add(frame frames.Frame) error {
192193
}
193194
} else {
194195
err := a.appender.AddFast(metric.ref, tarray[i], values[idx][i])
195-
if err != nil {
196-
return errors.Wrap(err, "failed to AddFast")
196+
if err != nil && strings.Contains(err.Error(), "metric not found") {
197+
//retry with Add in case ref was evicted from cache
198+
metric.ref, err = a.appender.Add(metric.lset, tarray[i], values[idx][i])
199+
if err != nil {
200+
return errors.Wrap(err, "failed to AddFast and Add")
201+
}
197202
}
198203
}
199204
}

clients/py/v3io_frames/__init__.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,9 @@ def Client(address='', data_url='', container='', user='',
8282
----------
8383
A new `Client` object
8484
"""
85+
address = address or environ.get('V3IO_FRAMESD')
86+
if not address:
87+
raise ValueError('empty address')
8588
if not (address.startswith("grpc://") or address.startswith("https://") or address.startswith("http://")):
8689
address = "grpc://" + address
8790
protocol = urlparse(address).scheme or 'grpc'

clients/py/v3io_frames/client.py

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@
1212
# See the License for the specific language governing permissions and
1313
# limitations under the License.
1414

15-
from os import environ
16-
1715
import pandas as pd
1816

1917
from . import frames_pb2 as fpb
@@ -183,9 +181,6 @@ def __init__(self, address, session, persist_connection=False,
183181
----------
184182
A new `Client` object
185183
"""
186-
address = address or environ.get('V3IO_FRAMESD')
187-
if not address:
188-
raise ValueError('empty address')
189184
self.address = self._fix_address(address)
190185
self.session = session
191186
self._persist_connection = persist_connection

clients/py/v3io_frames/frames_pb2.py

Lines changed: 375 additions & 321 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)