question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

odb: fix ambiguous remote resolution

See original GitHub issue

Related : https://github.com/iterative/studio-support/issues/57

  1. Ambiguous behavior: For given script:
#!/bin/bash

set -exu
pushd $TMPDIR

wsp=test_wspace
rep=test_repo

rm -rf $wsp && mkdir $wsp && pushd $wsp
main=$(pwd)

mkdir $rep && pushd $rep

git init 
dvc init

echo "data" > data
echo "data2" > data2

dvc add data data2

echo "  remote: myremote" >> data2.dvc
dvc remote add myremote $main/storage

git add -A
git commit -am "initial"

dvc push -r myremote
rm -rf data data2 .dvc/cache

dvc pull

in fetch

we will get three “different” odb. (None, Local#1, and Local#2). This is happening due to two things: one is that we don’t evaluate “no” remote to our default remote, which, for consistency, we probably should. Another, the bigger problem is that two odb’s are never equal: https://github.com/iterative/dvc-objects/issues/134 While it might not be a big issue for us (yet), Studio might be impacted considerably by it, as we are creating separate remotes for each output. Even though we should use one.

It seems that it’s also related to https://github.com/iterative/dvc-objects/issues/4 - with odb caching we could probably also avoid spawning new odb’s.

cc @Suor

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
Suorcommented, Aug 26, 2022

The suspicious even technically part for me is that ObjectDB.__eq__ does not correspond to ObjectDB.__hash__. The latter is quite strait-forward (self.fs.protocol, self.path).

These two are supposed to have a matching logic, as I understand.

2reactions
skshetrycommented, Aug 25, 2022

Instantiating ODB does not involve anything other than simple init, and the underlying filesystems are already cached. I did not expect that to be slow.

Is there a use case where this behavior is expected? If the underlying fs are cached, why not cache this too?

Why cache if you don’t need to? In fsspec filesystems, there may be state/sessions/client that need to be reused/reopened so caching helps.

For ODB, it’s not necessary, and caching comes with it’s own set of problems.

Read more comments on GitHub >

github_iconTop Results From Across the Web

C++ Object Persistence with ODB - Code Synthesis
ODB is an ORM system for the C++ programming language. ... To resolve this ambiguity, we can explicitly specify the object relationship that...
Read more >
Bug-fix commits in 6.0 - LWN.net
The following list contains the commits with Fixes tags in the 6.0 kernel release, ordered by the release in which the fixed commit...
Read more >
Better Technology, More Options - Uplink Security
Supports Uplink Remote. Specifications subject to change ... Remote configuration and management. * Available in Canada Soon ... UPLINKGPS™ HW AND OBD.
Read more >
Text - GovInfo
(8) Ensure fair, impartial, and timely investigation and resolution of complaints of discrimination in employment, including complaints of sexual harassment ...
Read more >
Alexa.ThermostatController Interface 3 - Amazon Developer
When the thermostat controller mode is set to OFF , the power controller power state is set to OFF . The following example...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found