Hi Val,

it's like:

public class LoaderThread extends Thread {
    private static final Logger LOG = createProprietaryLogger();

    private Ignite ignite;
    private IgniteCache<String, User> cache;

    public LoaderThread(Ignite ignite) {
        this.ignite = ignite;
        this.cache = ignite.getOrCreateCache("userCache");
    }

    @Override
    public void run() {
        //WILL cause the issue: LOG.info("Import data into Ignite");
        //WON'T cause the issue: createProprietaryLogger().info("Import
data into Ignite");

        Map<String, User> dataToCache = loadDataToCache();

        try (IgniteDataStreamer<String, String> stream =
ignite.dataStreamer(cache.getName())) {
            stream.allowOverwrite(false);
            stream.addData(dataToCache); //issue during this call --
happens just once
        }

        dataToCache = loadDataToCache();

        try (IgniteDataStreamer<String, String> stream =
ignite.dataStreamer(cache.getName())) {
            stream.allowOverwrite(false);
            stream.addData(dataToCache); //NO issue during this call
        }
    }

    private Map<String, User> loadDataToCache() {
        //...
    }
    //...
}

User is not Serializable and there is no logger in the User class.
The loaded test-data is always the same.
The source of the logger is pretty complex and I'm not allowed to share it,
but what I can say is that it replaces JUL.
However, the first line in the run-method leads to a broken (see LOG.info)
run or a working (createProprietaryLogger().info) run.
I couldn't believe my eyes, however, I can reproduce it over and over again
just by changing this one line.

Kind regards,
Peter



2016-07-18 22:50 GMT+02:00 vkulichenko <[email protected]>:

> Hi Peter,
>
> I don't see your code, so can hardly suggest anything else. According to
> your description, I'm pretty sure the logger instance is being serialized
> as
> a part of key or value object, but I have no idea why. I would start with
> running the app in debug and checking if my assumption is right or not.
>
> -Val
>
>
>
> --
> View this message in context:
> http://apache-ignite-users.70518.x6.nabble.com/Off-heap-issue-tp6327p6356.html
> Sent from the Apache Ignite Users mailing list archive at Nabble.com.
>

Reply via email to